Harry Potter fans have waited for an open-world Harry Potter game for almost two decades, and it’s crazy to think that we may have finally got what we have been asking for. After a lengthy wait and fear of delays, it’s finally here.
So, the question is: does Hogwarts Legacy live up to the expectations, or do we have another No Man’s Sky and Cyberpunk 2077 situation on our hands?
I have never understood why FizzBuzz was deemed a means of screening developers. The idea is for multiples of 3; you print Fizz. For multiples of 5, you print Buzz, and for multiples of 3 and 5 (15), you print FizzBuzz.
While this kind of prescreening question might have worked 15 years ago when information wasn’t as accessible as it is now (smartphones, smartwatches. etc.), it seems strange that some companies still ask developers how to write FizzBuzz.
ChatGPT is an AI-powered conversational API by Open AI that generates a lot of hype and fear amongst consumers, professionals and experts alike. Depending on who you talk to, ChatGPT will either revolutionise how we work, or it’s coming for our jobs and will taint academia.
You might have seen some news stories, including the impressive feats of ChatGPT passing prestigious law and business exams. And while these stories are understandably concerning, AI is based on learning and is no different from people reading books and learning materials available online to do the same thing.
Have you ever stopped to think about the impact social media has on your peace of mind? It was a realisation that came too late towards the end of 2022. The constant arguing, negativity, and drama on platforms like Facebook and LinkedIn took a toll on my mental health and well-being. I realised I needed to step back and break free from the negative echo chamber.
You might not realise it, but even seemingly harmless platforms like LinkedIn can have a negative impact on your life. What started as a professional networking platform has fallen prey to the negativity that plagues other social media platforms like Facebook. The constant barrage of conflicts and drama was too much for me to handle.
Well, it’s 2023, and many experts are predicting a recession on the horizon. And while no one knows how bad it will be or if many countries will avoid recession, one thing is sure: companies that can weather the storm will be the ones that can adapt quickly and efficiently.
Despite this pending threat of economic meltdown, many companies persist with anti-WFH policies, offering ultimatums to employees: return to the office or quit.
It’s 2023, and we still have no simple way to insert Gutenberg blocks into WordPress using wp_insert_post. You’re out of luck if you want to pull content from an API and insert it dynamically with ease. There are methods like parse_blocks and render_blocks but they still require a lot of messing around to work with.
The way Gutenberg blocks work is strange. They’re not stored as an array or structured data in the database. They are stored in the HTML as HTML comments.
I recently worked with GitHub Actions, where I generated a JSON file and then needed to add it to the repository. I parsed some Markdown files and then dynamically created a manifest JSON file of them, committing it into the repo every time a push was made.
I hit a permissions roadblock I embarrassingly spent over an hour solving, and I hope you don’t make the same mistake.
name: Build Blog JSON on: push: paths: - 'blog-posts/\*\*/\*.md' jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Get list of Markdown files run: | cd blog-posts files=($(ls \*.md)) json\_array=() for file in "${files[@]}" do date\_string=$(grep -E '^date: ' "$file" | cut -d' ' -f2) # Use the date command to extract the year, month, and date year=$(date -d "$date\_string" +%Y) month=$(date -d "$date\_string" +%m) day=$(date -d "$date\_string" +%d) json\_array+=($(echo "{\\"file\\":\\"$file\\",\\"date\\":\\"$date\_string\\",\\"year\\":\\"$year\\",\\"month\\":\\"$month\\",\\"day\\":\\"$day\\"}")) done echo "[$(IFS=,; echo "${json\_array[\*]}" | jq -s -c 'sort\_by(.date)')]" > ../static/blog.json - name: Remove trailing comma run: | sed -i '$ s/,$//' static/blog.json - name: Commit changes run: | git config --global user.email "no-reply@github.com" git config --global user.name "GitHub Actions" git add static/blog.json git commit -m "Update blog.json" git remote set-url origin https://x-access-token:${{ secrets.GITHUB\_TOKEN }}@github.com/${{ github.repository }} git push env: GITHUB\_TOKEN: ${{ secrets.GITHUB\_TOKEN }} Now, the important part of my action is the Commit changes action. You need to supply an email and name for the committer. In this instance, I just made up something generic. The first important line is setting the origin URL. We are referencing some variables GitHub creates for us automatically. Notably, GITHUB_TOKEN and repository.
In a hilarious read in the Australian Financial Review, a propaganda piece disguised as an article on remote work and office perks has been published titled WFH raises the bar for offices.
I meant to post this last year, so this has been sitting in my drafts. But I found it so comical and biased that I felt compelled to write about it.
Mirvac, a large Australian property developer with a vested interest in getting people back into the office (because it also owns commercial real estate), has set up a trial space for clients and architectural firms. But, showing just how out of touch they are, a paragraph in the linked story reads.
PHP, the programming language that has been declared dead more times than a cat has lives, is still very much alive and kicking. Despite what some elitist developers may say, PHP is not going anywhere anytime soon.
Despite all the naysayers constantly predicting its demise, PHP continues to chug along, powering some of the biggest websites on the internet.
Let’s start by taking a look at the statistics. According to W3Techs, PHP is currently used by 78.9% of all websites with a known server-side programming language. That’s a pretty impressive number, considering that PHP has been around since 1995. To put it in perspective, that’s longer than some developers have been alive. And the reason why it has been around for so long is that it just keeps getting better.
If you have been a reader of my blog for a while, you would know that I am an avid cryptocurrency enthusiast. I believe in the tech more so than the financial side. I find blockchains fascinating because, despite their perceived complexity, you can implement a blockchain in any programming language; Javascript included.
I thought it would be fun to create a blockchain using TypeScript and then iteratively change the code to offer more flexibility, such as the ability to add metadata into the blocks and query the blocks themselves.