Advice for Aspiring Career-Hoppers, Part V
As promised, this is the fifth part of a short series to provide some quick guidance for people who would like to reach out feelers into a possible software development career. As I mentioned in the first post, a lot of this material is recycled from some of my old Quora answers, updated for current times and the tone of the blog. More of it turns out to be new, the longer this goes on.
This time through, weâll talk about starting a project. I suspect thatâif you have been reading alongâyou either have learned the basics of some technology stack or are in the process of doing so (or maybe youâre just a programmer who wants some extra ideas; it happens!), and (either way) are looking to get accustomed to actually programming.
Diving into the Deep End with a Project
The easiest way that Iâve found to learn programming is to just learn by doing. While (as mentioned) thereâs some minimum amount of experience you should probably have so that youâre not completely lost, but otherwise, your best bet is to just move forward. Youâll struggle and make a lot of mistakes, of course, but itâs much more productive andâŚwell, more fun than studying seven different ways that you might repeat some code without any context of what kind of code you might be repeating.
What to Look for in a Project
In the case of learning to program, the project should have a handful of qualities.
-
It should do something that interests you. If youâre not interested in seeing it working, youâre less likely to stick with it. If itâs something youâre going to actually use, thatâs even better, because youâll be motivated to get it right.
-
The concept should be simple. If it takes more than one breath to describe everything you want, then there are probably too many moving parts that might interact in bad ways.
-
If any of your features involves verbs like âfigure out,â âpredict,â or âorganize,â it might not be a bad project, but the features you want most are probably going to need to wait until later. Honestly, because there are many problems that arenât computable, itâs even possible that what you want could be impossible. So, just keep that in mind.
-
In fact, if you can phrase all of your features in CRUD termsâcreate, retrieve, update, and deleteâyouâll probably find yourself much happier as you work.
-
The exception is if you can find someone else to do that work for you, like a free web service that allows you to make requests. You can find many examples of such services in this GitHub repository.
-
-
While it sounds like it contradicts the idea that the project should be simple, it should also be significant enough to require sustained work over (at least) a few weeks, to make sure you learn to do more than just a single thing.
In other words, you want something thatâs significant, but not going to take forever, and challenging, but not discouraging.
Example Projects
If you have trouble coming up with a project that fits the bill, here are some possibilities that might spark a decent idea. Most of them are probably going to use public APIs (âapplication programming interfacesâ) from the aforementioned GitHub repository.
-
Maybe the oldest standby project in the industry, but also one that nobody enjoys writing or using, is a book/music/video database. Users create a page for every book/album/movie they own, with a title, author/artist, year of release, and so forth. When that works, you can add user accounts to keep everybodyâs collections separate, notify users of other users who own the same material, use one of the media-based APIs to try to auto-fill information for the user, and so forth.
-
A website to check the weather. There are already millions of these, of course, but imagine a site that takes the current weather and forecast from one or more weather API. Once you have that running, you can add the ability to create an account where each user might set their location and create a list of weather conditions they would like to be notified about. You might also save the weather information over time for the userâs location, to supply a historical view, and adding air quality data may also be interesting.
-
Combine multiple news APIs into a single âfront pageâ of headlines for a given day on specific topics. When thatâs done, add accounts where users can change those topics and rate the articles.
-
Use the APIs at the Open Trivia Database, UI Names, and This Person Does Not Exist (or one of the other ways of getting a random name and face, like the avatar creators) to create a game that plays like Hollywood Squares: Two players play Tic-Tac-Toe, but to mark a square, a âcelebrityâ (the random name/face) is âaskedâ a question (from the Open Trivia Database) and ârespondsâ with one of the four answers for the question, chosen randomly. The player can then âagreeâ or âdisagreeâ with the fake celebrity. When that works, it can be extended to have the fake celebrities quip about why they know the answer and user accounts can allow players to compete remotely and track how many games each player has won.
-
Use recipe APIs to let a user plan what they would like to cook for a week. Allow the user to download a shopping list (combine the common ingredients from each recipe), a schedule, and the recipes as separate items. Allow users with accounts to save recipes, making it easy to add to another weekâs plan.
-
Create a chat system, where people can create an account and get involved in a conversation, storing the history over time. The world doesnât need another chat system, but you have probably used enough of them to know what features you like and which you would like to fix, so I donât need to list them, here.
Ideally, that gives you some guidance of what projects are probably the right size and complexity to start out. Of course, if you get it wrong, nobody is going to make fun of you for giving up on a project or coming back to it later.
Getting Started
So, assuming that you now have a project, where do you go from here?
The easy parts are setting up the project. The web application framework you chose (assuming youâve gone with web programming) almost certainly has a âcreate a new projectâ command that you found at the start of the documentation. Youâll need to give the project a name, and I can only recommend keeping your names functional and describing what the project is supposed to do. Personally, Iâm pro-pun and against using the names of any technologies (language, framework, API, whatever) in the names of projects. You might have a different preference.
Next, youâll need to set up version control for the projectâs folder. Once youâve done that, if youâre using git, head over to gitignore.io to get an âignore fileâ that makes sense for your project. Download it to the project folder and call it .gitignore
(yes, it starts with a period), so that the version control system doesnât strain itself keeping track of files you shouldnât care about. Then, add all files and commit them. Now, if you do something absolutely terrible, you can always âresetâ the project to this starting point; every time you commit, thatâs another point in history that you can return to.
Thatâs all important, but administrative work. Now, itâs time to get to work.
Planning
Take a few minutes (literally just a few minutes) to sketch out your plans for the application. Specifically, what pages does your application need? What will the user see on each page?
Then, for each of the pages, think about that Model-View-Controller pattern. What information do you need to have in your pageâs Model? Are you accounting for the input and output? What information will you display and request on the View? What actions does the Controller need to take to get the information the View needs?
Programming
Once you have answers to those questions (and, if weâre being honest, sometimes you donât actually need all of those answers, if youâre willing to bumble your way throughâŚ), itâs time to start programming.
Personally, I would recommend starting with writing the simplest View, since the HTML will probably be easy to write and you can immediately see your progress. In other words, itâs an easy win and it helps you know whether youâre moving in the right direction with the Model and Controller.
Once you have your View, work on the different aspects of Model that I went into in the post about learning the bare minimum. Youâll probably need a database table or two, plus a âclassâ that represents what the View needs to see.
And then you have your Controller to work on, taking the user input and using it to update and prepare the Model for the View to show you. The application frameworkâs documentation probably has a list of methods (actions) you need to implement for a given Modelâusually similar to Create, Retrieve, Update, and Delete, under different namesâeach of which works with a separate View.
In many web application frameworks, you can often short-cut some of this work by generating a âscaffoldâ for your model. A scaffold is an automatically generated Model-View-Controller set that creates the Model based on specified fields, a set of Views for each of the CRUD actions, and a Controller with empty versions of each of the CRUD actions ready for you to fill them in. It doesnât save you any thinking, but it will usually save you from doing the boring, repetitive work.
Continuing Administration
Whenever you get something working, commit your changes to version control and move on to the next piece. In addition, run your static analysis tools frequently, so that you donât find yourself dealing with hundreds of warnings that might be an important sign that youâre about to break a lot of piecesâŚbut also might be entirely benign stylistic issues. If you can keep everything compartmentalized, youâll be much happier as you continue.
If you realize that thereâs a significant task to take care ofâfor example, connecting to someoneâs API or combining data in interesting waysâcheck to see if thereâs a library that someone has written to do the job for you. Most modern programming languages have a registry, where you can go to the website and search for the kinds of features you need. After all, a good rule of thumb is that every line of code that youâre not responsible for writing and testing is more time you can spend on something you care more about.
Finallyâspeaking of testing codeâwhenever you write or update some code, take a moment and ask yourself what might go wrong. If the user is supposed to give you a phone number, how many ways can that user give you a bad phone number, and what happens if they do? What happens if a book title is a thousand words long? Written in Chinese? Is it all emoji? Was it not typed in at all? More importantly, what can your code do to make sure that the user can correct the mistake before itâs a problem?
As you get more experience, you might want to consider putting the testing first, in fact. Almost every modern programming language can take advantage of an automated testing system and test-driven development, where you write a series of tests (small programs) that you know will fail, then write the code that makes them pass.
Keep at It
One of the nice things about the Model-View-Controller approach is that you always have a place to go. No matter what feature you need, you can quickly decide whether itâs part of the View, Model, and/or Controller. Itâs also easy to decide whether itâs a Create, Retrieve, Update, or Delete action. Youâre not always going to be right about that decision, but you can always fix it later. And if you can always fix your problems later, that means you can always just plow forward now, even if itâs not the best result.
As a quick tip, when you learn something, write it down. Itâs useful to occasionally go back and see how far youâve come and have a record where you can look things up. Heck, consider starting a blog and writing it there, so that the next person who decides to start programming can learn it from someone who had it fresh on their mind and still understands the confusion. My Monday-morning posts have been an overview of what I worked on from week to week (plus any small tidbits I picked up along the way), and I think it has helped my focus, preventing me from making changes without thinking about what they mean in English.
And, of course, ask for help! As Iâve mentioned before, programming is hard work that stresses some people out, and there is no reason you should shoulder it all alone when there are so many experienced developers looking at Q&A sites for a chance to make somebody elseâs project easier. Just be aware that some people areâŚa bit aggressive in their attempts to help, and may try to turn it into a lecture on how you shouldnât be trying to do anything that you think you need to do. When you find someone like that, itâs your call whether to listen to them, probably depending on how well you know the person, but most of us find it easiest to just thank them for their time and ask someone else.
Keep chipping away at the project, feature by feature, and eventually, you have what you envisioned at the beginning.
Next
This should put you on the path to getting experience programming. With any luck and some persistence, youâll have a working project in a couple of weeks, gotten to know your way around your technology stack, and maybe even made some contacts of people willing to help out.
Your next steps should be to continue down this path. When you have one project âdone,â move on to another project. Make your project available someplace public, if you donât absolutely hate it. Document how to run the projects. Look for other peopleâs projects that you would be willing to help with. With each of those, youâll gain some confidence and experience.
Meanwhile, for next Sundayâs post, weâll take a look at the non-technical issues involved in transitioning to a software career. As much as nobody wants to use the phrase, youâll need to âsell yourselfâ to credibly look like the sort of person a hiring manager needs for their team.
Credits: The header image is Untitled by Richard Tilney-Bassett, made available under the CC0 1.0 Universal Public Domain Dedication.
By commenting, you agree to follow the blog's Code of Conduct and that your comment is released under the same license as the rest of the blog. Or do you not like comments sections? Continue the conversation in the #entropy-arbitrage chatroom on Matrix…
Tags: quora career