#that my engineering roommates have ZERO tools between them
Explore tagged Tumblr posts
Text
My roommates keep stealing my tools because they don't have any, so I'm curious
2K notes · View notes
hktime9 · 5 years ago
Text
“How to write better code?” asked a computer scientist-to-be
This is a question that I get once every 2 weeks (on average) mostly from my colleagues and friends who are studying the same degree for the same time as I. Why do they ask me? To be honest- I don’t know. What I also don’t know is the answer to their question. But I’d try to summarize what I think of the question. The answer to this question depends on many factors. If the questioner is a computer science major, I’d see what year they are in. Here’s my year to year advice to them:
- Freshman year: Coding at first is really intimidating. Its given that you’d spend hours in front of your screen to find that one line that does not compile. Here, you should remain patient and learn to accept that this problem demands a finite amount of time and focused concentration to overcome. Using online sources like stack overflow and GitHub are great options but never a first step if you want to become a decent coder. Go line by line and figure out what’s happening and whether it’s the right behavior. Freshman year includes a lot of programming labs, projects and assignments. Try to do all of them and start well before your deadline (seriously). Make it a habit to write a small program everyday. Could be a simple program to add two numbers or anything of that sort. Do some string operation or something. This would not only improve your algorithmic thinking, but also would polish the syntax of the language you code in. Like everything else in the world, mastery comes after practice. So hang in tight!
-Sophomore year: By now you have some experience of the life cycle of a typical program: understand the problem statement, do it on paper the way a human would do, do it on paper the way a computer would do, translate the latter to the programming language in question, debug. Now you also know some basics of computer science through some programming courses and maybe a few systems courses as well. The scope of your programming assignments should not be higher than maybe some array based tasks or implementing a few data structures like linked lists and binary trees to name a few. I’m assuming that you are completing your programming assignments religiously. If not, you really should be doing that before putting in extra work to improve your coding. I’ve seen people depending/copying on other people’s work even in individual assignments. While some might get away from plagiarism penalties and policies of your university, others face some sort of penalty (could be a grade reduction or something of that sort). While the latter might learn a lesson, the former fails to develop their skills and ultimately suffers in their professional life. So leaching on a friend is never a good option, well not in the long term. Try to do it even if you’re finding it hard. Take help from your teaching assistants and the rest of the course staff. You need to realize that these people are paid to help you. So please utilize office hours and appointments to the fullest. Doing extra always helps like attempting optional parts or the ones that give extra credits. Do some interesting problems and coding puzzles like the ones on hackerrank and leetcode. These are some excellent resources to polish up your skills as a developer and problem solver because they include some obvious metrics like completion, correctness and time. Have a study group where you can discuss your assignments and homeworks. There’s a difference between discussing and copying/leaching off. Mind that difference.
-Junior year: This is when you’re comfortable with programming in general. You know how it can be applied in a array of different tasks. You might have taken some old school courses like algorithms, databases and operating systems. PS I’m counting data structures as a programming intensive course and did not give it a special mention in the sophomore section :(. Go for some interesting courses like a networks course, AI/ ML or maybe some usability course. These courses will help you appreciate how you just cannot run away from programming. You’ll learn new approaches like socket programming and programming over a network (maybe some Remote Procedure Calls?). Go for some interesting applications. I remember developing a simple chatting application over a network during my junior year. I hosted it on the university’s network and anyone on the network could use it (if they knew the ip, obviously). I not only developed it, but also made it resistant to buffer overflows and scripting attacks(XSS) thanks to my roommate cum penetration tester. Once done with your Databases course, you can go for a full stack level by learning some server side and client side scripting. Learn some server based frameworks in javascript or anything. Look for some widely used frameworks; the ones which have a wider developer community. The community support will help you a lot, trust me. Some front end frameworks (client side) like ReactJS and VueJS are great these days. You can learn them using some MOOCS if your university doesn’t offer a course on them. Personally, Coursera is a great resource. Its super easy to use and has great customer care. Their “Full-Stack Web Development with React Specialization” offered by the Hong Kong University of Science and Technology is great. Once done you are fully capable to work as a full stack developer and the only thing stopping you is an internship offer from a company and time to practice. The latter can be achieved on your own, while the prior needs some homework and external networking. Connect to some local organization and CEOs on LinkedIn. Make sure you have a well maintained and updated LinkedIn profile and turn on recruiter discoveries to get recruiter in-mails. Be on the lookout for internship offerings and openings. Apply whenever you get a chance. Working on an organization’s project will help you learn a lot. It will not only improve your coding and problem solving stills, but also make you realize how important it is to work in teams. The latter is crucial to success in the industry since a project has multiple groups composed of many individuals. Be sure to take up work that is doable within the deadline. Keep a good relation with your supervisor and always ask for specific direction to get it right the first time.
Senior year: This has to be the most confusing year in-terms of future planning since graduation is approaching and life after is somewhat uncertain. Don’t let this fear of the uncertain get to you. My advice might not be very concrete because I, myself, am a senior while writing this. But I’ll try to incorporate my learning and findings here. The first question you might want to answer is whether coding is for you. This question is not presented before because there wasn’t an escape from it earlier because you had assignments that required you to code. Now that you can take up courses that need minimal programming effort like human-computer interaction and usability/planning courses you have a way out. These include courses like requirement engineering and planning. There are other examples as well which aren’t difficult to find. The answer to the question posed would not be a yes unless you completely love programming, in which case you’re on the right track. Loving programming is different from being good at it. You might love it and be bad at it and that’s completely fine in which case you should multiply your efforts to get better at it. Again, practice is the key. Try out programming courses on Coursera or some other platform. Get a github for student account. You’ll get it for free if you have an email account provided by your university. I’d like to make a special mention to Educative.io which offers a plethora of courses for free if you have a github for students. Educative.io is user friendly and keeps good track of your progress through the course. It is run by a very dedicated team. I personally know people working there who write articles and make courses. Almost all of them have worked as teaching assistants during their time at the university and most certainly know what they are doing and there work reflects their capabilites. They have some amazing courses. Do check it out if you have a github for students account. You’d also get free access to paid tools like AWS, Azure, DigitalOcean and Heroku. If the answer to the question is no, then you need to research more on courses and fields in computer science that do not require intense programming. These 3 years will definitely equip you with the skills that you need to do “some” coding that these fields demand. There wont be much but not zero at the same time. If you are still undecided about the question, you really should invest time knowing an answer. Ask your professors for help. Tell them honestly what you feel and why you can’t make a decision considering that you’ve spent considerable time doing it. They might guide you to a definitive answer. And then continue according to the answer. Now’s also a good time to look into industry’s standards and best practices. Maybe learn a new language? Or try using mainstream tools and familiarize yourself with devOps. Some of them are Docker, Jenkins, Slack, Jira, Git and many more, each with a set of its own unique features. Their knowledge and use will help you once you land a job because most organizations use them on a daily basis. Try some cloud computing platforms like the Amazon web services, Microsoft’s Azure and Google’s Cloud Platform. These platforms offer an array of services like storage, hosting and compute. Familiarize yourself with their usage because they usually have a learning curve. Do a lot of hobby coding. Try different approaches to a problem. For example I was going through geekforgeeks and came across an interesting problem which had a greedy solution and required an LCM (Least Common Multiple) of two numbers. The author had used a builtin function for computing it. I wondered if I could write it recursively. I decomposed the problem and found an optimal substructure which proved that a recursive solution should exist. I worked on it and wrote it and it worked. It was a mere 10 liner. Practice like the one mentioned will help you develop confidence while improving your coding skills. So practice writing code even if its not that intensive and long and hopefully you’ll see improvement.
This concludes my very first attempt that writing. I plan to write more and post here often. I’m eager to get feedback and comments. Here’s my LinkedIn profile. I really hope this helps the reader. Thank you for reading
41 notes · View notes