shutterstock_400812724
Tags   
Tags 

Starting Out In Tech: Rules to live by when writing code

Break out of your comfort zone and don't be afraid to fail.
-

“It is impossible to live without failing at something unless you live so cautiously that you might as well not have lived at all.”

I use this J.K. Rowling quote every day to remind myself to step out of my comfort zone because I am a cautious person. Sometimes that can impact my coding.

Before I started my first day of front-end web development, I made a list of the main mistakes people usually make when they start coding, to see what I could anticipate and dodge ahead of time.

WorkingNation’s Jaimie Stevens.

Here are some of the things I read and found to be true in my coding classes:

Watch your formatting: A beginner can almost instantly be spotted when they use messy formatting. Code should be indented correctly, and there should be consistent use of new lines and white space. Indenting code is how to show logical structure. Consistency in format is critical. This way you don’t wonder where things are all the time.

Take out commented sections that you don’t need. A big goal of a coder should be to have code that self-documents — this means that the variable, function, class names and structure relay the message of the code itself to others without the need for additional side-comments.

Commenting is still valuable, but should only happen when necessary and should always be concise. The purpose of comments is to provide a document if you need to go back and remember what you did.

Be careful of the inconsistent use of uppercase and lowercase in your variable and function names. Also, it’s important to note that the usage of uppercase and lowercase varies between languages.

Use meaningful variable and function names. It’s essential that your code’s intent is clarified. If you have two variables with the same name in different places, it can disrupt the flow of your code. Avoid spelling mistakes in your variable names, and don’t use slang. Form practical naming conventions.

Ultimately, coding companies have standards. You will need to learn how to conform to those standards, so this is good practice in the meantime.

RELATED STORY: Starting Out in Tech: How to think like a programmer

Never start coding without a plan: Before you start in on a program, make sure you understand all of the requirements and what it needs to do.

Consider its design — you need to understand how it will work internally. How will the interface look and how will it be navigated? Design a test in advance — this will help you lay it out.

Try not to overcomplicate things: Your code needs to be simple so it will be used, re-used and extended. Your code should be able to be extracted into its own module. The simpler the code, the fewer bugs you’ll have, and the less time you’ll spend debugging.

Take advantage of debugging tools: A debugger gives the programmer the opportunity to sift through the code to better, more fully understand what it’s doing. This step is critical for a program that’s not working, but it’s just as crucial for a program that appears to be working fine. The debugger gives you more information to work with when you need a more detailed understanding of what your program is doing.

Always, always backup your work: You can use Dropbox or Github for safer, backed up versions of your code. There are inexpensive systems that back up the entire disk on a nightly basis.

Run tests throughout the development process: Always test on major browsers while you’re building your code to avoid any surprises. Do not leave testing until the last minute.

Don’t doubt yourself: Beginners always seem to be convinced that they aren’t smart enough to make it in programming, that there’s a specific type of brain that they need to have — there isn’t.

These are all good things to keep in mind while you’re starting out in coding. It’s always good to be careful, but if you are too worried about making mistakes in coding, you’ll never learn. The more mistakes you fix, the more you’ll learn about what you don’t know.

It’s vital that you not only learn how to solve problems but learn how to solve them in different ways. That’s what coding is all about. So stop worrying about failing and go for it!

Join the Conversation: What are your rules to live by when writing code? Share them on our Facebook page.

Coming Next Week: Jaimie introduces the coding language Python. Are you ready?

Dana Beth Ardi

Executive Committee

Dana Beth Ardi, PhD, Executive Committee, is a thought leader and expert in the fields of executive search, talent management, organizational design, assessment, leadership and coaching. As an innovator in the human capital movement, Ardi creates enhanced value in companies by matching the most sought after talent with the best opportunities. Ardi coaches boards and investors on the art and science of building high caliber management teams. She provides them with the necessary skills to seek out and attract top-level management, to design the ideal organizational architectures and to deploy people against strategy. Ardi unearths the way a business works and the most effective way for people to work in them.

Ardi is an experienced business executive and senior consultant who leverages business organizational transformation through talent strategies. She uses her knowledge and experience to develop talent strategies to enhance revenue and profit contributions. She has a deep expertise in change management and organizational effectiveness and has designed and built high performance cultures. Ardi has significant experience in mergers, acquisitions, divestitures, IPO’s and turnarounds.

Ardi is an expert on the multi-generational workforce. She understands the four intersecting generations of workers coming together in contemporary companies, each with their own mindsets, leadership and communications styles, values and motivations. Ardi is sought after to assist companies manage and thrive by bringing the generations together. Her book, Fall of the Alphas: How Beta Leaders Win Through Connection, Collaboration and Influence, will be published by St. Martin’s Press. The book reflects Ardi’s deep expertise in understanding organizations and our changing society. It focuses on building a winning culture, how companies must grow and evolve, and how talent influences and shapes communities of work. This is what she has coined “Corporate Anthropology.” It is a playbook on how modern companies must meet challenges – culturally, globally, digitally, across genders and generations.

Ardi is currently the Managing Director and Founder of Corporate Anthropology Advisors, LLC, a consulting company that provides human capital advisory and innovative solutions to companies building value through people. Corporate Anthropology works with organizations, their cultures, the way they grow and develop, and the people who are responsible for forming their communities of work.

Prior to her position at Corporate Anthropology Advisors, Ardi served as a Partner/Managing Director at the private equity firms CCMP Capital and JPMorgan Partners. She was a partner at Flatiron Partners, a venture capital firm working with early state companies where she pioneered the human capital role within an investment portfolio.

Ardi holds a BS from the State University of New York at Buffalo as well as a Masters degree and PhD from Boston College. She started her career as professor at the Graduate Center at Fordham University in New York.