Monday, February 3, 2014

Stuck? Review, Debug, Rebuild.

Just finished troubleshooting a very irritating bug.

In the process, I ran up against a couple of walls and got pretty frustrated. I ended up just setting it aside for awhile, since I was out of strategies to try. I think this was the best course of action for someone with my admittedly limited experience.

I asked a senior developer about it this morning, and he encouraged me to follow this flow in the future.



















I don't know if it was something funny about my IDE or just the standard n00b problem of missing some important steps, but my current build of the project was pretty screwy. This caused an error when my C++ app tried to execute a script in SQL Server. Cleaning and doing a full rebuild was just the ticket.

So, when I don't know what to do next, I'm adding "full rebuild" to the list of options.

Wednesday, January 29, 2014

I've Got 99 Problems... and I am the Solution!

Until very recently, I was a business systems analyst (BSA) at a large financial services company. In changing career paths, I have noticed that application developers have to think very differently from BSAs.

Typically, a BSA's role is all about requirements, details, and approvals. Some problem solving is required, but a BSA's problems tend to center around people. In that position, I was always reasonably confident that the answer was out there. I was also pretty good at knowing how to find it.

As a developer, I am finding that sometimes, the answer isn't out there. My job is to create the answer, not document one that already exists. This is simultaneously my favorite and my least favorite part about my new role as a programmer.

Very little frustrates me as much as attempting something that should be simple -- such as getting my code to compile -- and running into wall after wall without any success.

And very little is more exhilarating than finding an elegant solution to a difficult problem.

Despite the occasional moments of wanting to bash my head against the wall, I think I'm going to like this job. It's a fun change to be the one creating answers instead of the one who records them.

Monday, January 20, 2014

Lucidchart: A Great Replacement for MS Visio

I was looking for an online flowchart utility and found this web-based gem of an application: Flow Chart Maker & Online Diagram Software | Lucidchart.

Lucidchart has an impressive number of features that are attractive to me (and, I suspect, many other users):
  • Integration with Google Drive
  • Intuitive user interface (Visio is nowhere near this good at UI design)
  • Cloud-based storage
  • Excellent collaboration support
  • Tier-based, feature-driven pricing model
They aren't paying me anything to say this; I tried it and really just think it's a terrific app. The clean, modern website design is also notable and gives them big marketing points, in my book.

I am looking forward to using this app more... I hope it lives up to my initial good impression.

Friday, January 17, 2014

Change

Whoever said that change is good probably wasn't a programmer.

I don't know about you, but if my code is running well and isn't eating up too many system resources, I don't want to change it. This is particularly true for purely stylistic changes. For example, I am seeing a lot of code like this in a program I've been reviewing:

if(a == false){    Do action;}

if(b == true){    Do action;}

This syntax isn't going to throw any errors, but it bothers me because it's not good idiomatic C++. A better (and equivalent) way to express these statements would be:

if(!a){    Do action;}

if(b){    Do action;}
If this was a novel -- or even one of my students' papers -- I would slash away with my red pen. With production code, however, that can be dangerous.

Yes, cleaning up legacy code can improve readability and, in some cases, even performance. But the risk of bumping or forgetting something in the process is greater than any benefit I can imagine from making the change.

Bottom line: in written or spoken English, I am quick to assert my preferences. The risk is low and I have the experience to back my preferences up. In production code, though, my motto is closer to "If it ain't broke, don't fix it."

Thursday, January 16, 2014

strcat() != StirCat

Whenever I see strcat(), the C++ function for concatenation, I can't help but think of this:

















That is all.

Wednesday, January 15, 2014

Best MOOC for Beginning Programmers

I took An Introduction to Interactive Programming in Python on Coursera.org this fall, and I was amazed by how well it was designed.

This course provides a nice first look at programming in general, and Python specifically.1 While it gives many step-by-step instructions to help beginners through the tasks, it also leaves some intentional small gaps for students to fill in on their own.

Overall, the design and content are the best I've seen in a MOOC. Big-time kudos to Scott Rixner and Joe Warren, the masterminds behind this course. (They had help from a couple of other Rice faculty members, as well.)

I was especially impressed with the fully cloud-based Python Integrated Development Environment, CodeSkulptor, which Dr. Rixner designed for the course. This tool allows you to enter and run Python code using nothing more than an Internet connection and a Web browser.

If you want to poke CodeSkulptor around on your own, you can feel free to. You don't have to be enrolled in the class to use it. It also includes a Graphical User Interface module called SimpleGUI, which allows you to code visual elements without too much fuss.

Coursera is a great MOOC platform, and this course really showcases its flexibility and power. I would love to see more offerings like this in the future, as well as some more advanced courses in Python.

You can read Rixner's and Warren's reflections on creating the course here: MOOCs: Lessons from the front lines.

You can also watch them discuss MOOCs with the president of Rice in this video: The professors behind the first massive online open course at Rice University.


1 If you're a complete novice and you find this course overwhelming, you might try Introduction to Systematic Program Design - Part 1 or Computer Science 101 first. They are both quite good as well, and they provide content tailored for those with little prior exposure to programming.