Three months ago I made a swift and interesting turn in my career: I officially became an Opensource developer. That was an impromptu decicion: I saw an internal job ads at my company, and decided to see what it’s like, didn’t even expect that I would get the job. Fast-forward until today, I’m glad I made that change, not that I didn’t like my old job (I loved it), but because working as an opensource developer has helped me learning valuable lessons that I don’t think I would have learned otherwise.
This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 Part 4 Recently one of my friends asked me if I intended to continue the series “How to Learn Coding,” of which the last part I wrote was one year and a half ago (tbh, I had already forgotten about that series). Well, reading again what I wrote back then, I think I ended the series for good: those lessons that the past me brought up there were all valid, and I don’t believe the today me can bring up any additional critical point.
Last time, we have talked about Virtual Functions in C++, and get to know the keyword virtual, which must be set on the parent class’ functions that may be overidden by the children classes, or else the child’s versions of those functions may not be called at runtime (instead, the parent class’ versions would be called). As there are still more stuff I find complicating about this topic, I want to write another part to clarify it out, first to myself, and hopefully it can help some others as well.
This week, I decided to start off a series of mini posts, which is called “The Weeklies”. It’s based on the ideas of The Dailies, an article I stumbled into while trying to find stuff that can help me improve my C++ level. I don’t really have time to do this thing daily, and with the remote working situation, it’s not realistic to do that in the office either, so I decided to give it a try with weekly (or as frequent as I can) posts on my blog.
I’ve just had the longest “staycation” since joining Ericsson almost 2.5 years ago, and during that 2 weeks I managed to make this new pet project that I’d like to show: https://github.com/lthh91/camel-up It is the electronic version of the board game Camel Up, with support for multi-players mode. While the backend logic was written in Python, an area where I feel at home, I had never been into frontend dev before (only had a little knowledge of html, css and vanilla js), so learning a whole framework for this project was indeed challenging, but interesting.
2020 is coming to an end. It indeed was a strange year to all of us: at times, it felt like the year would keep going on forever, but now that we are looking back, time seemed to fly much faster this year than any previous one. Whether positively or negatively, I think we all agree that 2020 has been (and soon, was) so remarkable that we won’t ever forget it (in this lifetime, at least).
Howdy! It’s been quite some time since my last post. Recently I have had quite a few crazy ideas, and for some reason none of them really worked :D, so sadly I couldn’t share with you so much (I prefer sharing stuff which I know in-and-out, rather than reporting the experiments). Luckily, this week one of those weird ideas turned out to produce something fun (and valuable), so I decided to share it with you today.
While concurrency and parallelism may sound similar (and in fact, are sometimes used interchangably both in normal and in computer contexts), the two terms actually are not the same. In this post, I will explain each of the terms’ origin, how different they are and why are they oftenly used incorrectly. By its definition, a computer is a machine which computes, so it’s not a surprise that the CPU, which stands for central processing unit (and which we normally refer to as a computer chip) is the most important element of the machine.
Some weeks ago, I wrote a post called Life is a Big Game, in which I described some lessons I learned from playing the video game The Witcher. Some time has passed since then and my “journey” in the game has also progressed; hence I find a couple of more things from doing quests in the game that I would like to share. The thing I wanna talk about today is how (and why) to tackle “big monsters”, i.
Today we’ll discuss a somewhat technical issue that I bumped into a few days ago: what is the optimal way to check if at least one element in a list satisfies some condition? Let’s take a real example. We will use python, but in general the problem can be solved similarly in many other languages: number_list = [2, 5, 8, 3, 6, 20, 34, 68] def larger_than_twenty(number): return number > 20 How should we check if at least one element of the number_list satisfies the larger_than_twenty condition (i.
I’m on vacation this week, and similar to vacations of everyone else living in a semi-lockdown pandemic state, it turns to be a stay-cation, in which instead of travelling to a far unknown and adventurous land, or sun-bathing on a nice beach next to a big coconut decorated with a funny hat and a colorful straw, I stay home and do random things. To be fair, there are tons of projects I should be working on (like finishing some draft posts I started in this blog), but since it has been quite rough few weeks, I decided to take it easy and do something fun.
Hi, Sorry for having been deferring this project for quite some time, I just moved to a new apartment, and there have been quite many things running lately. This post is just a short update on the project: I managed to build almost every core function of the game: https://github.com/lthh91/FlappyBird, but some fine-tuning is needed. The game is kinda difficult to play right now, the bird seems to be dropping and jumping in a quite uncontrollable manner.
The featured image of this post is the Hainanese Chicken Rice I made right after watching a Youtube tutorial There are two “major” skills that I have (kind of) successfully learned since I decided to leave my parents’ home in Vietnam and come to a whole different country, thousands of miles away: One of them is definitely coding, and the other is cooking (of course, there are more skills I mastered, you’re not likely to survive independent life with just two new skills, but those two are the ones I am most satisfied with).
I hope that by trying removals and changing parameters, you have figured out what these lines of code do: op := &ebiten.DrawImageOptions{} op.GeoM.Translate(-float64(frameWidth)/2, -float64(frameHeight)/2) op.GeoM.Translate(screenWidth/2, screenHeight/2) In case you haven’t, let’s quickly check the Cheatsheet for ebiten.DrawImageOptions type DrawImageOptions struct { // GeoM is a geometry matrix to draw. // The default (zero) value is identify, which draws the image at (0, 0). GeoM GeoM // ColorM is a color matrix to draw.
Last time, we stopped at mentioning that there are three functions needed for the game loop: Update(), Draw() and Layout(), of which all are functions of the Game struct. According to the cheatsheet, the whole Game struct is an instance of the Game interface, as follow: type Game interface { // Update updates a game by one tick. The given argument represents a screen image. Update(screen *Image) error // Draw draw the game screen.
This weekend I decided to start another tutorial series in this blog, as I did learn a lot during making the last one. This time I decided to up the ante by picking up on a language that I am not very familiar with: Go Programming Language, or Golang. If it is the first time you heard of it, Go is a language designed at Google, is syntactically similar to C and is very well-designed to support concurrency.
Yesterday I was watching this TEDx video by Mark Rober about something he called “The Super Mario Effect”. It is a great sharing of tricking your brain (and others’) into learning (hard) things, by “Focusing on the Princess and not the pits, to stick with a task and learn more”. I’d recommend everyone to watch the video to learn more about this “effect”, but this post isn’t supposed to talk about it.
Lately, keywords like Machine Learning, Artificial Intelligence (AI), Deep Learning (Neural Network), etc. have become familiar with most of us, but as I observe, not everyone understands it, hence many of us are under a big illusion about computers’ intelligence. Some of my facebook friends even expressed that they’re scared computers will overcome us soon after reading Dan Brown’s novel Origin, which was published some years ago. In this post, we will start exploring this mystery of artificial intelligence, by understanding what “Machine Learning” means.
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
So a few weeks ago, I had a wild idea to explore Emacs, after watching this hilarious clip from one of my favorite show Silicon Valley. For a long time, I have been curious what Emacs is, and why so many people claim it’s better than VIM (to be fair, there are also many people who claim Vim is better than Emacs), the only reason I did not try Emacs was just because I liked how easily it gets to move around and edit things in VIM, and I heard that Emacs doesn’t work that way.
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
Though I am not a hard-core Manga or Anime fan, I’m a big fan of Naruto. When I was a kid, I could only watch a few episodes that were broadcast-ed on TV, and that was one of my favorite shows at the time. Unfortunately, the show was cut off (from Vietnamese TV) after about 200 episodes, so I could not watch the rest of Naruto and the whole Naruto Shippuden.
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part tutorial. To see other posts in the same series, please click below: Part 1 - Setup virtualenv Part 2 - Setup Pygame Part 3 - Start making game Part 4 - Make a “flapping” flappy bird Part 5 - Make the bird fly Part 6 - Pipe System Part 7 - Kill the Bird Part 8 - Add game logic Part 9 - Finalize the game
This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 Part 4 6. Find something you’re interested in and start doing This is an important point: Programming is not about remembering all the little detail about your language of choice, nor it is about reading a lot of books or watching several tutorial videos. It is about mastering some tools so that you can make things you want to make.
After the short introduction of VIM, I hope I did persuade you to start using this awesome editor to replace any bloated software you have been using. However, I understand that it can be difficult to get started, and the vimtutor might not work for everyone. Back when I first started using VIM, I was in the same position, and the only thing that kept me from giving up on it was simply because I couldn’t run VSCode or Atom on the remote super computer at work.
In this blog, so far I have talked about minimal software, about command line interface, and most importantly, about how not using your mouse is good for productivity. cased those “principles” that (I hope) we’ve come to an agree, now is the time to discuss something more practical, starting with: what text editor we should use? In this post, I want to introduce to you a little bit about one of the best options you can go with: VIM.
In the post about command-line interface, I discussed briefly on the slowness of computer mouse in comparison with using keyboard, and argued that your workflow would be much more smoothly and faster if you could ditch your mouse and work fully using your keyboard. Well, one could say it is a unrealistic and stupid idea: mouse was invented for a reason, and that reason is that you can’t do everything with your keyboard.
In the last post, I briefly mentioned how much bloated general software have become over the years. Let’s talk about it in details to see the whole situation. To be clear, I’m not criticizing the big tech companies for any of their work: as businesses they need to generate profits, and their work benefits other people, too. No matter what their reasons are, what they do creates a world where the efforts we need to use technology is minimized, and that’s a good thing.
Hi, today I want to talk about a topic that is quite commonly discussed everywhere nowadays: minimalism. Well, not the minimalist lifestyle in general, but about minimalism in software. What is software minimalism? According to Wikipedia, minimalism in computing refers to “application of minimalist philosophies and principles in design and use of hardware and software.” The result of applying minimalism in software design is applications that are lightweight, fast and reliable.
Today I would like to present to you about the power of command-line interface (CLI), as a better alternative to the graphical user interface (GUI) that everyone uses every day (well, maybe not exactly everyone, we have to subtract people who are too old, too young, in comma, etc., but you know what I mean), by giving you a simple example. This is the first in a series that I tend to write about cli application, and how they will help you become more efficient in your tasks.
This is one part of a multi-part post. To see other posts in the same series, please click below: Part 1 Part 2 Part 3 3. Learn how to learn One of the things that everyone should know but have almost never been taught at school is the skill to acquire knowledge. Instead, we were taught how to pass the exams by cramming into our mind a bunch of cr*p that, most of the time, have no practical values.
A buddy of mine from college just started learning programming in Python, and he told me that it was “very complicated” and there are too many things to remember, which he normally mix up. As someone who just started teaching himself to code a few years ago, I understand the feeling, and for that reason I would like to write this post to share some of my experience. Hopefully it will have the chance to help some of you guys out there, who, like my friend and I, want to learn programming but find it too challenging.
A few days ago, while we were having dinner, my wife suddenly told me: “You know, almost everyone I know has some sort of talents. It’s just me that don’t.” As you may have imagined, I didn’t expect to hear anything like that at all, so I responded with a question: “What kind of talents are you talking about?” “Well, all those kinds of arts or science things: some are good at singing, some at drawing, others at math, etc.