Wednesday, May 17, 2017

Top 5 mistakes new programmers make while developing

Is programming an art or science? While numerous proofs can be made on programming languages on their properties, which puts it in the realm of science, inspiration is the source to a program that can be described as elegant as well as efficient.
Being such so, in the early years, programming is often a singular pursuit that offers great satisfaction. As a programmer matures and Interest become Vocation, the nature of programming changes. What was a lone effort is now collaborative. And while there was none in the past, deadlines constantly looms high over the programmer. This change has led many programmers down the same path of discovery and maturity. Some become disillusioned, others trudge on and often making the same mistakes those ahead of them.
Being a programmer myself, I am also guilty of some of the following mistakes. In no particular order,

1. Trying to fix the problem on their own. A remnant of the lone programmer mindset or the advent of the 'lone programmer against the world' world view. Often followed by the belief that nobody else can help or solve the problem but themselves. This despite knowing well someone else has walked along the path before they did. Solution: a. Always repeat to yourself: This is not a unique problem. Someone else has solved it or solved something similar to it. Look for that solution. b. Talk to someone. Sometime the act of telling someone one provides another perspective.  
2. Dismissing bugs as 'small' in front of others. Those 'small bugs' can get very big. Treat all bugs the same or through the same process.
3. Going down a rabbit hole. That is hyper-focusing on one issue which create more problems or needs changes elsewhere. Which goes recursively until a few hours is lost. Solution: Mandatory breaks where you stop thinking about the problem and have something to eat OR talk to someone about the problem and what you are doing.
4. Not familiar with the production OS platform and not giving a care. Assuming just because it runs on platform, it must on the other. Followed by the attitude that because it doesn't, it's the platform's fault. The big picture: The customer doesn't care. All they want to see is that it's done and running. While the platform developers are at fault, you still have to care for the target's platform. What other services does it offer?  Hoe do I use them. Classic example: while a lot know about ssh, not many have used scp despite both using the same platform and technologies
5. Assuming the most technical/complicated solution is the right one to match the difficulty of the bug. Because only such a solution is 'worthy' of this bug. In reality, the best solution is often the simplest. Wield Occam's Razor wisely and the path to the solution will present itself.

Monday, July 18, 2016

Pressing Save in Blogger doesn't mean it did

You are have been writing the post on and off for the past few hours. You have been diligently pressing save to make sure you didn't lose your magnus opus. Other tabs are opened to access other websites for reference. Before switching between them, you still press save, just in case. Finally, after reading and correcting the post, you are finally satisfied with it. A final press of Save should do it. Then you hit Close.
The dialog box pops up and warns you that unsaved changes will be lost. You press Save again and hit Close. Blogger warns again. "But I just saved! What else do you want me to do?" You press ok and find yourself back in the list of posts. The time and date of the post was just a few seconds ago. You click on the post to add "one more thing".  And half of the post is gone.
Blogger warned you. So far, there is nothing that can be done. Pressing the back button has saved me a few times in the past but not recently. Especially with browsers driving the Back and Forward button into extinction. (Think about it,  Firefox on PCs don't have the Forward button, Chrome on Android don't have the back button). 
So what should you have done? The moment the dreaded "unsaved changes will be lost" dialog come up, press Cancel. Select all the text in your post, copy and paste them to a text edit (like notepad). There is no other way. That post is Titanic. Pressing save doesn't save it. Pressing ok at the dialog will lose the edits but is the only way to move on. Re-open the post and past back the text. And edit the format. And add the pictures again.  If your are wondering why Blogger didn't take over the world, this is one reason.

Lesson:Don't ignore that "Unsaved changes will be lost" in Blogger.
If Blogger overwrote your post, there is a way to get it back.

Recently Popular