Coding Category Archives - General Assembly Blog | Page 2

Beginner’s Python Cheat Sheet

By

Do you want to be a data scientist? Data Science and machine learning are rapidly becoming a vital discipline for all types of businesses. An ability to extract insight and meaning from a large pile of data is a skill set worth its weight in gold. Due to its versatility and ease of use, Python programming has become the programming language of choice for data scientists.

In this Python crash course, we will walk you through a couple of examples using two of the most-used data types: the list and the Pandas DataFrame. The list is self-explanatory; it’s a collection of values set in a one-dimensional array. A Pandas DataFrame is just like a tabular spreadsheet, it has data laid out in columns and rows.

Let’s take a look at a few neat things we can do with lists and DataFrames in Python!
Get the PDF here.

BEGINNER’S Python Cheat Sheet

Lists

Creating Lists

Let’s start this Python tutorial by creating lists. Create an empty list and use a for loop to append new values. What you need to do is:

#add two to each value
my_list = []
for x in range(1,11):
my_list.append(x+2)

We can also do this in one step using list comprehension:

my_list = [x + 2 for x in range(1,11)]

Creating Lists with Conditionals

As above, we will create a list, but now we will only add 2 to the value if it is even.

#add two, but only if x is even
my_list = []
for x in range(1,11):
if x % 2 == 0:
my_list.append(x+2)
else:
my_list.append(x)

Using a list comp:

my_list = [x+2 if x % 2 == 0 else x \
for x in range(1,11)]

Selecting Elements and Basic Stats

Select elements by index.

#get the first/last element
first_ele = my_list[0]
last_ele = my_list[-1]

Some basic stats on lists:

#get max/min/mean value
biggest_val = max(my_list)
smallest_val = min(my_list)avg_val = sum(my_list) / len(my_list)

DataFrames

Reading in Data to a DataFrame

We first need to import the pandas module.

import pandas as pd

Then we can read in data from csv or xlsx files:

df_from_csv = pd.read_csv(‘path/to/my_file.csv’,
sep=’,’,
nrows=10)
xlsx = pd.ExcelFile(‘path/to/excel_file.xlsx’)
df_from_xlsx = pd.read_excel(xlsx, ‘Sheet1’)

Slicing DataFrames

We can slice our DataFrame using conditionals.

df_filter = df[df[‘population’] > 1000000]
df_france = df[df[‘country’] == ‘France’]

Sorting values by a column:

df.sort_values(by=’population’,
ascending=False)

Filling Missing Values

Let’s fill in any missing values with that column’s average value.

df[‘population’] = df[‘population’].fillna(
value=df[‘population’].mean()
)

Applying Functions to Columns

Apply a custom function to every value in one of the DataFrame’s columns.

def fix_zipcode(x):
”’
make sure that zipcodes all have leading zeros
”’
return str(x).zfill(5)
df[‘clean_zip’] = df[‘zip code’].apply(fix_zipcode)

Ready to take on the world of machine learning and data science? Now that you know what you can do with lists and DataFrames using Python language, check out our other Python beginner tutorials and learn about other important concepts of the Python programming language.

8 Tips for Learning Python Fast

By

It’s possible to learn Python fast. How fast depends on what you’d like to accomplish with it and how much time you can allocate to study and practice Python on a regular basis. Before we dive in further, I’d like to establish some assumptions I’ve made about you and your reasons for reading this article:

First, I’ll address how quickly you should be able to learn Python. If you’re interested in learning the fundamentals of Python programming, it could take you as little as two weeks to learn, with routine practice.

If you’re interested in mastering Python in order to complete complex tasks or projects or spur a career change, then it’s going to take much longer. In this article, I’ll provide tips and resources geared toward helping you gain Python programming knowledge in a short timeframe.

If you’re wondering how much it’s going to cost to learn Python, the answer there is also, “it depends”. There is a large selection of free resources available online, not to mention the various books, courses, and platforms that have been published for beginners.

Another question you might have is, “how hard is it going to be to learn Python?” That also depends. If you have any experience programming in another language such as R, Java, or C++, it’ll probably be easier to learn Python fast than someone who hasn’t programmed before.

But learning a programming language like Python is similar to learning a natural language, and everyone’s done that before. You’ll start by memorizing basic vocabulary and learning the rules of the language. Over time, you’ll add new words to your repertoire and test out new ways to use them. Learning Python is no different.

By now you’re thinking, “Okay, this is great. I can learn Python fast, cheap, and easily. Just tell me what to read and point me on my way.” Not so fast. There’s a fourth thing you need to consider and that’s how to learn Python.

Research on learning has identified that not all people learn the same way. Some learn best by reading, while others learn best by seeing and hearing. Some people enjoy learning through games rather than courses or lectures. As you review the curated list of resources below, consider your own learning preferences as you evaluate options.

Now let’s dig in. Below are my eight tips to help you learn Python fast.

1. Cover the following Python fundamentals.

At a bare minimum, you (and your resource) must cover the fundamentals. Without understanding them, you’ll have a hard time working through complex problems, projects or use cases. Examples of Python fundamentals include:

  • Variables and types
  • Lists, dictionaries, and sets
  • Basic operators
  • String formatting
  • Basic string operations
  • Conditions
  • Loops
  • Functions
  • List comprehensions
  • Classes and objects

If you’re really pressed for time, all of these fundamentals can be quickly explored on a number of different websites: docs.python.org, RealPython.org, stavros.io, developers.google.com, pythonforbeginners.org. See the section below on “Websites” for more details.

2. Establish a goal for your study.

Before you start learning Python, establish a goal for your study. The challenges you face as you start learning will be easier to overcome when you keep your goal in mind.

Additionally, you’ll know what learning material to focus on or skim through as it pertains to your goals. For example, if you’re interested in learning Python for data analysis, you’re going to want to complete exercises, write functions, and learn Python libraries that facilitate data analysis. The following are typical examples of goals for Python that might pertain to you:

  • Data analysis
  • Data science and machine learning
  • Mobile apps
  • Website development
  • Work automation

3. Select a resource (or resources) for learning Python fast.

Python resources can be grouped into three main categories: interactive resources, non-interactive resources, and video resources. In-person courses are also an option, but won’t be covered in this post.

Interactive resources have become common in recent years through the popularization of interactive online courses that provide practical coding challenges and explanations. If it feels like you’re coding, that’s because you actually are. Interactive resources are typically available for free or a nominal fee, or you can sign up for a free trial before you buy. 

Non-interactive resources are your most traditional and time-tested; they’re books (digital and paperback) and websites (“online tutorials”). Many first-time Python learners prefer them due to the familiar and convenient nature of these mediums. As you’ll see, there are many non-interactive resources for you to choose from, and most are free.

Video resources were popularized over the past 10 years by MOOCs (massive online open courses) and resembled university lectures captured on video. In fact, they were often supported or promoted by leading universities.

Now, there’s an abundance of video resources for various subjects, including programming in Python. Some of these video resources are pre-recorded courses hosted on learning platforms, and others are live-streamed courses provided by online education providers. General Assembly produces a live course in Python that covers Python fundamentals in one week

Below I’ve compiled a list of resources to help you get a jumpstart on learning Python fast. They fall into the categories laid out above, and at a bare minimum they cover Python basics. Throughout the list, I’ve indicated with an asterisk (*) which resources are free, to the best of my knowledge.

Interactive Resources: Tools and Lessons

  • CodeAcademy: One of the more popular online interactive platforms for learning Python fast. I know many Python programmers, myself included, who have taken CodeAcademy’s Python fundamentals course. It’s great for an absolute beginner, and you can knock it out in a week. It will get you excited about programming in Python. 
  • DataCamp: Short expert videos with immediate hands-on-keyboard exercises. It’s on-par with the CodeAcademy courses. 
  • *PythonTutor.com: A tool that helps you write and visualize code step by step. I recommend pairing this tool with another learning resource. This tool makes learning Python fundamentals a lot easier because you can visualize what your code is doing. 

Non-Interactive Resources

Non-interactive resources fall into two sub-categories: books and websites.

Books

In researching books, I noticed a majority of them were actually catered to existing programmers interested in learning Python or a master Python programmer looking for reliable reference material (“cookbooks”) or specialized literature. Below, I’ve listed only the books I think are helpful for beginners.

Websites

At first, my list started off with over 20 examples of websites covering Python fundamentals. Instead of sharing them all, I decided to only include ones that had a clear advantage in terms of convenience or curriculum. All of these resources are free.

  • *Google’s Python Class: Tutorials, videos, and programming exercises in Python for beginners, from a Python-friendly company. 
  • *Hitchhiker’s Guide to Python: This guide helps you learn and improve your Python code and also teaches you how to set up your coding environment. The site search is incredibly effective at helping you find what you need. I can’t recommend this site enough. 
  • *Python for Everybody: An online book that provides Python learning instruction for those interested in solving data analysis problems. Available in PDF format in Spanish, Italian, Portuguese, and Chinese. 
  • *Python For You and Me: An online book that covers beginner and advanced topics in Python concepts, in addition to introducing a popular Python framework for web applications.
  • *Python.org: The official Python documentation. The site also provides a beginner’s guide, a Python glossary, setup guides, and how-tos.
  • *Programiz in Python: Programiz has a lengthy tutorial on Python fundamentals that’s really well done. It shouldn’t be free, but it is.
  • *RealPython.com: A large collection of specialized Python tutorials, most come with video demonstrations. 
  • *Sololearn: 92 chapters, 275 related quizzes, and several projects covering Python fundamentals that can also be accessed through a mobile app.
  • *Tutorialspoint.com: A no-frills tutorial covering Python basics. 
  • *W3Schools for Python: Another no-nonsense tutorial from a respected web-developer resource. 

Video Resources

Video resources have become increasingly popular and with good reason: they’re convenient. Why read a textbook or tutorial when you can cover the same material in video format on your computer or mobile device? They fall into two sub-categories: pre-recorded video-courses and live video courses.

Pre-Recorded Courses

  • Coursera: A large catalog of popular courses in Python for all levels. Most courses can be taken free, and paid courses come with certifications. You can also view courses on their mobile app.
  • EdX: Hosts university courses that focus on specific use cases for Python (data science, game development, AI) but also cover programming basics. EdX also has a mobile app.
  • Pluralsight: A catalog of videos covering Python fundamentals, as well as specialized topics like machine learning in Python.
  • RealyPython.com: A collection of pre-recorded videos on Python fundamentals for beginners.
  • *TreeHouse: A library of videos of Python basics and intermediate material.
  • EvantoTutsPlus: 7.6 hours of pre-recorded videos on Python fundamentals, plus some intermediate content.  
  • *Udacity: Provides a 5-week course on Python basics. Also covers popular modules in the Python Standard Library and other third-party libraries. 
  • Udemy: A library of popular Python courses for learners of all levels. It’s hard to single out a specific course. I recommend previewing multiple beginner Python courses until you find the one you like most. You can also view courses on their mobile app.

Live Courses

  • General Assembly: This live online course from General Assembly takes all of the guesswork out of learning Python. With General Assembly, you have a curated and comprehensive Python curriculum, a live instructor, a TA, and a network of peers and alumni you can connect with during and after the course.

4. Consider learning a Python library.

In addition to learning Python, it’s beneficial to learn one or two Python libraries. Libraries are collections of specialized functions that serve as “accelerators.” Without them, you’d have to write your own code to complete specialized tasks.

For example, Pandas is a very popular library for manipulating tabular data. Numpy helps in performing mathematical and logical operations on arrays. Covering libraries would require another post — for now, review this Python.org page on standard Python libraries and this GitHub page on additional Python libraries.

5. Speed up the Python installation process with Anaconda.

You can go through the trouble of downloading the Python installer from the Python Software Foundation website, and then sourcing and downloading additional libraries; or you can download the Anaconda installer, which already comes with many of the packages you’ll routinely use, especially if you plan on using Python for data analysis or data science

6. Select and install an IDE.

You’ll want to install an integrated development environment (IDE), which is an application that lets you script, test, and run code in Python. 

When it comes to IDEs, the right one is the one that you enjoy using the most. According to various sources, the most popular Python IDEs/text editors are PyCharm, Spyder, Jupyter Notebook, Visual Studio, Atom, and Sublime. First, the good news: They’re all free, so try out a couple before you settle on one. Next, the “bad” news: Each IDE/text editor has a slightly different user interface and set of features, so it will take a bit of time to learn how to use each one.

For Python first-timers, I recommend coding in Jupyter Notebook. It has a simple design and a streamlined set of capabilities that won’t distract and will make it easy to practice and prototype in Python. It also comes with a dedicated display for dataframes and plots. If you download Anaconda, Jupyter Notebook comes pre-installed. Over time, I encourage you to try other IDEs that are better suited for development (Pycharm) or data science (Rodeo) and allow integrations (Sublime). 

Additionally, consider installing an error-handler or autocompleter to complement your IDE, especially if you end up working on lengthy projects. It will point out mistakes and help you write code quicker. Kite is a good option, plus it’s free and integrates with most IDEs.

7. When in doubt, use Google to troubleshoot code.

As you work on Python exercises, examples, and projects, one of the simplest ways to troubleshoot errors will be to learn from other Python developers. Just run a quick internet search and include keywords about your error.

For example, “how to combine two lists in Python” or “Python how to convert to datetime” are perfectly acceptable searches to run, and will lead you to a few popular community-based forums such as StackOverFlow, Stack Exchange, Quora, Programiz, and GeeksforGeeks.

8. Schedule your Python learning and stick to it.

This is the part that most people skip, which results in setbacks or delays. Now, all you have left is to set up a schedule. I recommend that you establish a two-week schedule at a minimum to space out your studying and ensure you give yourself enough time to adequately review the Python fundamentals, practice coding in your IDE, and troubleshooting code.

Part of the challenge (and fun) of learning Python or any programming language is troubleshooting errors. After your first two weeks, you’ll be amazed at how far you’ve come, and you’ll have enough practice under your belt to continue learning the more advanced material provided by your chosen resource. 

Concluding thoughts

By this point, we’ve established a minimum learning timeline, you know to select a learning goal for your study, you have a list of learning resources and learning method to choose from, and you know what other coding considerations you’ll need to make. We hope you make the most of these tips to accelerate your Python learning!

What Is coding?

By , and

Coding is a language, simply put. But that doesn’t stop the mysteries and the global misconceptions that swirl around it. Too often, coding is presented as difficult to understand and needlessly complicated. Why does coding have such a mystique?

Shahzad Khan, one of our lead instructors, breaks it down:

“People think that coding is about sitting in a dark room writing thousands of lines of incomprehensible code. It’s not.” Khan has built a career on breaking down the complicated concepts of coding into easily understood concepts in our Introduction to Coding course, which allows students to dive right into learning programming language. “With the new high-level languages like Javascript and Python, coding is more intuitive and closer to the English language than it has ever been.”

Just like with other languages, once you learn a coding language and how to use the tools of computer science to communicate, a whole new world opens up.

Coders have been known to perpetuate the mythology, though. When they talk about coding, practitioners can sound like proselytizers. They tell passionate stories of how coding has changed their lives — and the world. Famous lines of code have become legendary. Look no further than the Facebook “like” button, an example of how the most consequential code changes people’s behaviors. That’s a lot of power, and it can be intoxicating.

Steve Jobs famously claimed that everyone should learn how to write code because learning how to code teaches you how to think. That may be true, but this definition of coding is still our favorite: Coding is solving real-world problems with existing technology.

And the barriers to entry are relatively low. “Coding is awesome because it allows you to build some amazing things as long as you have a working computer and the internet. No need to go invest in expensive equipment,” says Khan. 

“Software is eating the world, so coding is already extremely important and will be even more so as we progress into the future. The right people who know how to code will save the world.”

The fact is that software is only getting more ubiquitous, finding its way into government and public policy. One look at the United States’ patchwork response to COVID-19, and it’s not hard to imagine how the right software at the right time could have lifesaving implications.

For others, coding is a calling and a way to express creativity — not something you usually associate with computer science. “Creating something is so satisfying, and coding is the ultimate tool to do that,” says Arwa Lokhandwala, one of our lead instructors:  “I love getting my hands dirty trying to learn how to use a particular technology to solve a problem or just creating something for fun.”

Coding isn’t a solitary, head-down endeavor, contrary to those popular misconceptions. We can dispel the image of the glassy-eyed, hoodie-wearing loner right here. “There is a common myth that coders work alone,” Lokhandwala continues. “That’s not true! Coding is a very collaborative role. You have to interact with your team members, designers, product owners, and stakeholders, to name a few.”

“We are entering the Fourth Industrial Revolution where technology will dominate every domain. Currently, people are using coding for everything from detecting diseases to exploring outer space. This is just the beginning. Coding is completely going to revolutionize every industry and give birth to new ones.”

Ready to learn? Enrolling in a coding bootcamp is a great way to learn coding without investing years or thousands of dollars. At GA, a coding bootcamp can be 12 or 15 weeks long and is designed to be a fast-paced learning experience. Students learn and implement quicker than in more traditional courses, and the most successful learn to trust the process. Our Software Engineering Immersive course gives students all the coding skills they need to start job hunting and is Khan’s favorite course to teach. “I love that I get to make an immediate impact in the lives of people who come to learn and want to change their lives for the better.”

Want to learn more about Arwa?

https://www.linkedin.com/in/arwalokhandwala-b831b/

https://www.instagram.com/code.with.arwa/

Want to learn more about Shahzad?

https://www.linkedin.com/in/shahzadkhanaustin/

https://flawgical.medium.com

How long does it take to learn coding?

By , and

How long does it actually take to learn coding? To create a diverse portfolio that wows clients, you’ll want to showcase your talents on varying platforms. But first, you’ll need to assemble your coding toolkit. The most efficient approach for beginners is to pick one programming language and try to master it. So, what can you expect next?

Since everyone’s learning style is different, the time commitment required to learn coding can vary. Some people will pick up a new coding language in days, while for others, it could take months. Taking a course specific to Python or JavaScript will teach you the core concepts of that language and how to write programs in those languages. Expect a bit of a learning curve as you train your mind to think like a programmer. But it’s all part of the process. In our coding courses, you’ll gain broad benefits that set you up for workplace success. You’ll learn best practices, get feedback from peers and experts, build a network, and receive career coaching.

Shahzad Khan, lead instructor and owner of software development and consulting firm Frame of Mind considers coding to be a life-long learning process. “Coding is a way of thinking rather than a thing you learn and implement. Once you understand that, it’s just a matter of practice. Some students will arrive at that “a-ha” moment faster than others.“

For those who can invest more time upfront, Khan recommends the intense learning environment of a bootcamp like our Software Engineering Immersive (SEI), which gives  all the coding skills for full-stack web development. 

“SEI will teach you everything from how to ideate and think about the user to how to implement design patterns and deploy the application to the cloud,” he says. “All that, in a nutshell, is full-stack development. You will learn at least two languages and their respective frameworks. There is also time dedicated to computer science fundamentals, so graduates have a robust exposure to concepts as they interview for their first role as software developers.” 

When Python instructor, Diego Rodriguez, was working as a data analyst, he used coding to get his job done faster. “I was doing many repetitive data analysis tasks, and I knew that if I could code, I could not only get through them quicker, but I could teach others to do the same. I read “The 4-Hour Workweek” by Tim Ferriss, and that shaped my perspective on how to work. I realized that coding would allow me to do more in less time.”

He encourages beginners to start with the fundamentals and apply learning code to a personal project for the most successful — and efficient — approach.

“In as little as two weeks, you can learn enough to take on small projects like creating data visualizations using structured data. If you’re learning with a specific goal in mind, you can focus on accomplishing each step of the workflow using code.”

Rodriguez breaks down just how long it takes to learn the programming language Python here. 

Want to learn more about Shahzad?

https://www.linkedin.com/in/shahzadkhanaustin/
https://flawgical.medium.com

Want to learn more about Diego?

https://www.linkedin.com/in/rodriguezadiego/

How To Learn Coding

By , and

Do you know how to use a computer? Do you have a curious mind? If you answered yes to both, you have everything you need to learn a programming language and become a coder. Coding is very accessible — it’s really that simple.

There are many ways to learn to code, from going it alone on a DIY coding website to scoring a coveted spot in a computer science doctoral program. Learning along with others and from an instructor who is passionate, knowledgeable, and has real-world experience creates our dynamic General Assembly environment. From a bootcamp Immersive to a classic Introduction to Coding, our coding courses are taught by professionals who are industry leaders. Essential is their own love of learning, and they thrive on sharing this with students, often in a collaborative discussion that covers a wide range of coding topics.

Lead Instructor at General Assembly Singapore, Arwa Lokhandwala, is a full-stack web developer and advocate for women in technology through groups like the Women Techmakers Community and Mumbai Women Coders. She describes herself as a coder at heart with a passion for sharing. We trust her guidance on all things coding.

“Anyone with a passion for learning new things can learn how to code, “ says Lokhandwala. “You don’t need a 4-year degree. Familiarity with computer science is good to have, but it’s not necessary; you can learn that as you go along. A lot of companies hire people directly from a coding bootcamp.”

“Bootcamps are inherently intense because there is a limited time period to train, which has its own advantages. The initial days are challenging, but as you progress with the projects you build, the people you interact with, and the things you learn, you will become confident with interviewing and getting the job. If you are just starting out with coding, I would highly recommend a GA Immersive because it gives you a community. Talking to other people who are in the same situation as you can help you get motivated.”

There is no one-size-fits-all, ideal coding student. Students at GA have come from all walks of life, from service industries to liberal arts backgrounds to working on an oil rig. Lokhandwala describes what makes a student successful. “Never giving up. Coding is hard, and nobody gets it on their first attempt. So don’t let your imposter syndrome get the better of you. Keep practicing, and you will get it. Your intrinsic motivation to code has to be stronger than the external motivation in order to create a fulfilling career.” 

Shahzad Khan, one of our lead instructors and owner of software development and consulting firm Frame of Mind, appreciates the experience that students from non-traditional backgrounds bring to his Introduction to Coding course at our Austin, Texas campus. Khan got a degree in philosophy and began studying programming languages as a way to gain acumen after graduate school. “I saw coding as something I needed to learn in a world where we are surrounded by software.” 

His passion for teaching makes his courses popular among returning students.

“I love teaching programming because it forces me to learn every single day and to think about different ways to explain complex concepts. Plus, I get to make some genuine connections with students and inspire them to awesome things.”

Want to learn more about Arwa?

https://www.linkedin.com/in/arwalokhandwala-b831b/
https://www.instagram.com/code.with.arwa/

Want to learn more about Shahzad?

https://www.linkedin.com/in/shahzadkhanaustin/
https://flawgical.medium.com

What can you do with coding?

By and

What do the most in-demand 2021 jobs and promising careers of the future have in common? Coding skills. At the same time, new applications of coding are making their way into existing roles, expanding job requirements in traditional fields like banking and marketing. Even for non-tech roles, coding skills are seen as a valuable bonus that can give job candidates an edge.

Our digital world buzzes with software code we use every day, from products and services in the form of websites to mobile applications to games and on and on. 

Computer programmer, developer, engineer, analyst  — these are just some of the titles rapidly populating the job boards of Fortune 500 companies, and coding skills are essential requirements in all of them. Arwa Lokhandwala, who teaches our popular Full-Stack Web Development course, breaks down the various titles and what they really mean.

“Most of these terms are used synonymously, but there is some slight difference between them. A computer programmer, for instance, includes anyone who uses a programming language to produce some digital output — this technically includes everyone who codes. A developer uses a wide array of technical abilities, from writing code and creating technical documentation to testing and debugging. An engineer, on the other hand, is a person who has a strong educational background in software engineering, computer science, and mathematics and can apply these concepts to solve or create digital solutions. Finally, the analyst’s main job is to analyze different metrics, understand data captured by these digital solutions, and derive useful insights from them that are beneficial for the business.”

Additional jobs for coding professionals include web designer, software engineer, and chief technology officer (CTO); myriad roles in the fields of web development, technical project management, and quality assurance; plus, almost every founder of a successful startup has a background in coding.

So, what does a typical career path look like? “You can either start out as a software engineer, software developer, or quality analyst. As you progress, you can become lead developer then either go towards becoming an engineering manager, solution architect or product manager,” Lokhandwala advises.

You don’t always have to make a big move to flex your coding muscles. Often newfound coding skills can help you to advance in your existing job. If you’re curious about how this may pertain to you, Lokhandwala suggests offering to solve a particular problem at your company that you think can be automated with coding and see how that affects your role. The next step would be to take a course in a programming language like Python or fast-track your career with a coding bootcamp like our Software Engineering Immersive. Whether you stay at your job or accept a better offer elsewhere, you’ll gain a distinct advantage in the job market and increase your earning potential.

The practical applications for coding language are vast and growing every day. From medical coding to building websites, freelance to full-time, the jobs that use hard coding skills are varied enough to fit every personality and lifestyle.

Lokhandwala sees many exciting new uses of coding on the horizon, all on the cutting edge of computer science. “Some of the most interesting are in the realms of augmented reality and virtual reality. Using artificial intelligence and machine learning to identify the early onset of diseases has huge implications.”

Want to learn more about Arwa?

https://www.linkedin.com/in/arwalokhandwala-b831b/
https://www.instagram.com/code.with.arwa/

Ways to make money coding

By , and

If computer scientists agree on anything these days, it’s that software is everywhere in our ultra-connected world. Since someone has to write all that software code, there are more ways than ever to make money coding.

And computer science prevails in our ever-shifting world. COVID-19 has revealed our global interdependence on computer science, and there’s no going back. From Roombas to mRNA, the applications of coding have come to define daily life in new ways. One enterprising coder recently made the news using the programming language Python to snag an elusive vaccine appointment in their city.

It’s easy to understand why coding skills are some of the most sought-after in today’s tech job market. So how do you actually make money with coding and start saving the world one line of code at a time? We have the answers.

Once you’ve got a few coding courses or a coding bootcamp under your belt, you’ll have a working coding toolkit that showcases your talent. Now it’s time to think about where you can put your coding skills to work. Job postings for computer programmers and calls for coding skills can be found at almost every company across the globe. Good to know: Some entry-level jobs offer on-the-job training, and you can essentially get paid to learn to code.

The healthcare tech sector has taken off, and this is a trend that beginner coders should watch. Certainly, the pandemic has made it easier to work from home, and coding naturally lends itself to remote work, opening up more job markets in far-flung locations. Even pre-pandemic, medical billing and medical coding were among the 20 fastest-growing tech occupations in the U.S. Now, with the boom in telemedicine and a growing need for data management, health tech remains a promising field for computer science. Vaccine passports and patient privacy concerns present perfect case scenarios for the problem-solving skills inherent in coding and are poised to create opportunities in both public and private sectors. From health data technicians to mobile app developers, the ways to make money coding in health tech are only set to grow. We see the potential for even more innovation because programmers have only begun to push the boundaries at the intersection of medicine and computer science.

Even though a lot of companies have suffered from the pandemic, our data show that the jobs for coding have not been affected nearly as much as other fields. Businesses previously without an online presence are now migrating towards it, giving programmers and coders plenty of new work.

One of our lead instructors, Arwa Lokhandwala, takes stock of the Singapore job market and notes that coding roles can pay very well, adding that, “There are both salaried and hourly options available, and you can also freelance your skills over several freelancing sites.” About half of her students in our Introduction to Coding course are looking for a career change and want to know how hard it is to break into coding. “I think the most difficult thing is the change in mindset when you move from other fields into coding. Keep practicing and keep learning. As long as you are skilled in what you do, the job market will be good to you.”

Most beginner coders know that building websites and web development are avenues now open to them, with even more demand for building mobile applications. Coding opportunities in gaming and game development show no signs of slowing down either. Traditional sectors like finance and banking are ramping up their software development and have a growing need for coders, as more of our day-to-day happens on the go and on our phones. Education has long been a sector ripe for disruption, with the pandemic sending everyone from school administrators to test providers scrambling to adopt technology in new ways.

Data visualization, machine learning, and artificial intelligence are some of the most exciting spaces for coding professionals right now. These fields are breaking new ground, and often, that’s where many thrill-seeking coders want to be.

The high demand for jobs with well-paying salaries is just one of the attractions for coders. Coding draws on problem-solving skills and attracts the intellectually curious. When computer programming is done right, it never gets boring because you are always learning new things. 

“I was attracted to coding because there is a lot of demand for programming,” says Shahzad Khan, who leads our Software Engineering Immersive in Austin, Texas. “But I also wanted to find a job that satiated my problem-solving skills and forced me to keep learning every day.”

Real-world applications of coding are everywhere, but that doesn’t always make them easy to spot. There are ways to make money coding that may not be on your radar yet. Khan names a few less-obvious career opportunities like working with electrical grid systems, charting airplane trajectories, and exploring space. “These days, anything that requires the internet is an application of coding.”

Want to learn more about Arwa?

https://www.linkedin.com/in/arwalokhandwala-b831b/
https://www.instagram.com/code.with.arwa/

Want to learn more about Shahzad?

https://www.linkedin.com/in/shahzadkhanaustin/
https://flawgical.medium.com

How to get better at coding

By and

You’ve got the coding basics, so what’s the next step? 

Arwa Lokhandwala is a lead instructor at our Singapore campus and also a full-stack web developer deploying scalable web applications that handle an average daily request load of up to a million queries. We asked her about the challenges of learning a programming language — what separates the amateur from the master?

“The mindset. Coding is hard, and it takes multiple attempts in the beginning to understand concepts,” she says. “That’s completely normal. Keep practicing every day, and don’t compare yourself with anybody else.”

One surefire way to get better at coding is by enrolling in a coding bootcamp. These totally Immersive courses are proven to jumpstart your coding skills, and you’ll come away with huge strides in proficiency. The Software Engineering Immersive (SEI) is our most popular 12-week coding bootcamp. All-day, every day, it’s a clear-your-schedule kind of course with commensurate benefits.  

Learning to code is often compared to learning a new language. In the same way that living in a foreign country is the fastest way to learn that country’s language, the immersion of a bootcamp is the fastest way to learning a new programming language and honing your coding skills.

Often getting better at coding means taking on a coding challenge and making lots of mistakes. The learning process at GA involves breaking problems down into small, solvable chunks. “People often are not used to that,” says Shahzad Khan, SEI bootcamp instructor. “You have to be okay with failing and being wrong. Learn to be patient with yourself. You learn by speaking it and by writing in it. Initially, you will sound terrible and use incorrect grammar, but as you speak and write it more, talk to more people, get feedback, and continue to improve, you will eventually feel comfortable with it.” 

The best indicator of success in all coding courses is a willingness to practice. “You can sit and think about a particular coding concept for hours and understand why it works the way it does, but it won’t do you any good until you actually build something using that concept. So, implement what you learn as soon as possible.”

Computer programming can inspire philosophical thinking at its best. If this sounds like coding and its practice can become something of a life philosophy for coders, it is. “To learn coding, you have to open yourself up to feeling like a child again. You have to unlearn some things. It can be an uncomfortable process. Usually, people find it too difficult because it makes them feel too uncomfortable. If you face that discomfort, you can learn anything.”

To get better at coding, coding courses and coding bootcamps can give you the time and focus to chart your path to success. They also provide the environment and community to foster that learning. There is very real work to be done, practice, and lots of iteration. But there is also the metaphysical aspect that famous programmers talk about. You can become a better coder by understanding their insights, too. Like this one by Martin Fowler, software developer and author of nine books, ”Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” And this one from John Johnson, “First, solve the problem. Then, write the code.”

So whether you’re ready to take the plunge with one of our Immersive coding bootcamps or you’re trying to solve a thorny work problem with code, remember to heed Khan’s advice and be patient with yourself. “Coding takes time and practice. You have to believe in yourself. You also need to be comfortable with being vulnerable. If you don’t open yourself up, you will resist change, and that will infiltrate your learning process.“

Want to learn more about Arwa?

https://www.linkedin.com/in/arwalokhandwala-b831b/
https://www.instagram.com/code.with.arwa/

Want to learn more about Shahzad?

https://www.linkedin.com/in/shahzadkhanaustin/
https://flawgical.medium.com

Top 5 JavaScript Interview Questions

By

JavaScript is one of the most popular programming languages. Even though there are many JavaScript-based frameworks like React.js and Node.js, the ability to answer some core JavaScript questions will always give you an upper hand during a coding interview.

So, let’s start with the top 5 JavaScript interview questions!

1. What is hoisting?

Hoisting is a default process wherein JavaScript moves all the declarations to the top of the current scope.

Example:

a=20;
console.log(a) // 20
var a;

Even though the JavaScript variable a is initialized and accessed before it’s declared, JavaScript doesn’t throw an error.

2. What is the purpose of closures?

As per MDN Web Docs,

“Closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment).” 

In simple terms, Closure is under functional programming, and it allows an inner function to access an outer function’s scope, even when the outer function has already returned.

Example:

const cartMode = function() {
    let items=[] // acts like a private variable
    function addItem(item) {
       items.push(item)
       return "Item added to Cart"
    }

    function totalItems() {
      return items.length
    }

    return {
       addItem,
       totalItems
    }

}

const cart=cartMode()
cart.addItem("Bag") // returns Item added to Cart
console.log(cart.items) // returns undefined
cart.totatItems() // returns 1

In the above example, the items variable is accessible to all the inner functions, but it’s not directly accessible from outside. This happens because of closures

3. What is the difference between let, const, and var?

Before ES6, JS had no way to support block-level scope variables. Now, we have:

  • var for creating function-level scope variables.
  • let for creating dynamic block-level scope variables.
  • const for creating constant block-level scope variables.

Example:

var a = 20

if(a > 10) {
  let b = 1
  const a = 2

  console.log(b,a, 'Inner Scope')   // 1 2 Inner Scope
}

console.log(a, 'Outer Scope')   // 20 Outer Scope

4. What is the output of the following code?

console.log("1")
setTimeout(function(){
  console.log("2")
},0)
console.log("3")

Output:

"1"
"3"
"2"

Even though we specified the delay as 0ms, it still prints “2” after “3.” This is because of the Event Loop in JavaScript. 

In this case, first, console.log(“1”) is executed, then setTimeout() is executed; after the specified delay (in this case, 0ms), the callback function is added to Message Queue. Now the main thread only picks up items from the message queue once the current execution is done. So, the main thread first evaluates the console.log(“3”) statement post. Then, it picks up the callback() from the Queue and executes the console.log(“2”) statement. Hence, the above output.

5. The Difference between arrow functions and regular functions?

Arrow functions are new ES6 syntax for defining functions. It looks like this:

const add = (a,b) => a+b
add(2,3) // 5 

The main difference between the arrow function and the regular function is the value of this keyword.

In the case of arrow functions, the keyword assigns a value lexically. What this means is unlike regular functions, arrow functions never create their own execution context. They, by default, take the execution context of the enclosing function, aka, parent. 

Here is another great article explaining this in-depth. 

Conclusion

Preparing for JavaScript Interviews can feel overwhelming, but you now know the JavaScript code, the programming language, and the scripting language; the only way to really answer an advanced JavaScript interview question is to examine things one concept at a time

How to Go From Zero to Hero in JavaScript Fast

By

JavaScript (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions — it is best known as the scripting language for webpages. It is a prototype-based, multi-paradigm scripting language that is dynamic, and it supports object-oriented, imperative, and functional programming styles.

Now, what does all that mean?

Well, it could be a bit overkill to try to explain those topics if you are just starting out in coding or learning JavaScript. In short, JavaScript most often correlates with client-side scripting on webpages. When you use a website, anything you interact with usually involves JavaScript — a search bar on Google or a dropdown menu on Facebook is all JavaScript.

While JavaScript was originally intended for websites, its uses have far surpassed front-end interactive website usage. JavaScript can be used as a server side-language with NodeJS to create desktop and mobile apps or program different electronics (popular YouTuber, Michael Reeves, uses JavaScript on a lot of his quirky inventions). JavaScript has expanded immensely since its inception with tons of different use cases and massive community support.

The Best Places to Learn JavaScript

There are many ways to learn JavaScript — here are some of the best and the most cost-effective ways.

1. Codecademy

Codecademy is a code-learning site that has multiple languages available with interactive and applicable examples. No downloads are necessary; it’s all in your browser! Best of all, it has a lot of free material.

I cannot stress how well Codecademy structures its learning process. I truly believe it gives a strong foundation and teaches you a lot of the basics that you need to get started with JavaScript.

However, just as with any coding language, it can be a little dry and tedious at first. Nonetheless, stick it out and work through the “Learn JavaScript” course:  https://www.codecademy.com/learn/introduction-to-javascript.

At the very least, work up t0 the “Browser Compatibility and Transpilation” section, but by all means, finish the entire course if you are up for it. 

2. freeCodeCamp

freeCodeCamp is very similar to Codecademy in the sense that everything runs in your browser. It has a code editor, console, and example browser window all within site. freeCodeCamp can seem daunting at first due to the sheer amount of content it has, but do not worry. If you are looking to learn JavaScript fast, it has a section called “JavaScript Algorithms and Data Structures Certification” specifically for JavaScript. It will take you through learning the basics of JavaScript and even some in-depth topics such as Data Structures and Algorithms.

Everything else freeCodeCamp has to offer is related to website programming. It even has sections on job hunting. If that is something you are interested in, I would recommend the entire site as it has a lot of great content. FCC also has a Youtube channel: youtube.com/c/freeCodeCamp, where it explains a lot of site topics in a video format.

3. Udemy/Youtube

I put these two in the same category since there is a lot of overlap, and you will see that a lot of people on Udemy use Youtube almost like a marketing tool for their full course. Nonetheless, a lot of Udemy courses range from $10–15 with a lot of good material. Really, one or two courses should be enough to learn JavaScript, so there is no need to spend a fortune. A few instructors I liked were Colt Steele and Brad Traversy.

Alternatively, both Colt Steele and Brad Traversy have Youtube channels that are free and have great content for learning JavaScript. Once you get the hang of the basics, I also recommend The Coding Train, which is run by Daniel Shiffman. I enjoyed all of these instructors’ teaching styles — they have great explanations for different concepts. That said, choose someone who best fits your needs and makes things clearest for you

How to Learn JavaScript Fast

As with any language, learning JavaScript requires time, studying, and practice. I recommend you learn the basics, which include:

  • Variables
  • Types of Data:  Strings, Integers, Objects, Arrays, Boolean, null, and undefined
  • Object Prototypes
  • Loops
  • If Statements/Conditionals
  • Functions

After you have those basics down, hop into some code challenges to get some practice. One site I would recommend is codewars.com. It has tons of challenges with varying levels of difficulty. Start at a basic level. Practice until you are comfortable with the above topics.

Another good practice exercise is making a game like tic-tac-toe or a basic calculator. With these exercises, you will be able to tackle different obstacles and exercise the syntax of JavaScript.

JavaScript Quick Tutorial

Variable Declaration

If the above materials are not enough, here is my quick JavaScript tutorial: 

First, we have variables. In JavaScript, there are three ways you can declare a variable:

  • var: function-scoped.
  • let: block-scoped.
  • const: block-scoped, but cannot be reassigned; it also is initialized with an “a” value, unlike “var” and “let.”

Data Types

There are different data types, as mentioned above, but the most important is Objects. Objects are used for various data structures in JavaScript such as Array, Map, Set, WeakMap, WeakSet, Date, and almost everything made with a new keyword.

A small note about null: If you were to check the data type of null through JavaScript, it would evaluate to an Object. This is a loophole that has been utilized by programmers for years. This might not be very common for you early on…

Comments

Comments in JavaScript are signified with “//” for single-line comments or “/* ….. */” for longer blocks of comments. I bring this up now since the examples below have comments.

Loops

If you are not new to programming, I am sure you know what loops are. For those of you who are new to coding, loops are used to iterate or repeat a block of code a certain amount of times or until a condition is met. Loops are often used to go through items in an Array.

The most common loops are the traditional for loops and while loops. A lot of the following is from the developer.mozilla.org and MDN, which is similar to the documentation for JavaScript — here are some of the different loops JavaScript has to offer:

for loop:

for ([initialExpression]; [conditionExpression]; [incrementExpression]) {

  // statement

}

Provided by MDN:

When a for loop executes, the following occurs:

  1. The initializing expression, initialExpression, if any, is executed. This expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of complexity. This expression can also declare variables.
  2. The conditionExpression expression is evaluated. If the value of conditionExpression is true, the loop statement executes. If the value of the condition is false, the for loop terminates. (If the condition expression is omitted entirely, the condition is assumed to be true.)
  3. The statement executes. To execute multiple statements, use a block statement ({ … }) to group those statements.
  4. If present, the update expression incrementExpression is executed.
  5. Control returns to Step 2.

An actual code example of a for loop:

for (let i = 0; i < array.length; i++) {

 // code here

}

For loops are extremely useful and used often. It is very important to understand and master how for loops work. 

do…while loop:

A do…while loop will run code until a condition is false

do {

  // statement

}

while (condition);

while loop:

A while loop is very similar to the do while loop, but the key difference lies when the conditional is checked. In a do…while loop, the code block runs, and the condition is checked after the while loop checks the condition and runs the block of code.

while (condition) {

  // statement

}

for…in loop:

For…in loop is used to loop over objects

for (variable in object) {

  // statement

}

for…of loop:

For…of loop is used typically for arrays or iterable objects. I must stress using the correct loops for arrays and objects to avoid confusion.

for (variable of array) {

  // statement

}

If Statements

If statements depend on whether a given condition is true and perform what is in the first set of the code block. Do not continue to evaluate the subsequent “else” portions. If there are subsequent conditions that need to be checked, the use of “if else” will be needed. If all conditions do not evaluate as true and there is an “else” provided, the “else” portion of the statement will be used. 

if (condition) {

   // statement1

} else if (condition2) {

   // statement2

} else {

   // statement3

}

Functions

There are two ways to write a function: a function declaration and a function expression. The “return” keyword is used in JavaScript to define what a function will return. All subsequent code below a return statement will not run inside a function.

Function Declaration:

function square(number) {

  return number * number;

}

Function Expression:

var square = function(number) {

  return number * number;

}

The key difference between the two is the function declarations load before any code is executed, while function expressions load only when the interpreter reaches that line of code.

Object Prototype/Classes

In order to provide inheritance, JavaScript utilizes things called prototypes.

Here is an example of what the syntax would look like:

function Person(first, last, age, gender, interests) {

  // property and method definitions

  this.name = {

    'first': first,

    'last' : last

  };

  this.age = age;

  this.gender = gender;

  //...see link in summary above for full definition

}

Creating a new instance of that prototype would look like this:

let person1 = new Person('Bob', 'Smith', 32, 'male', ['music', 'skiing']);

If you come from a different coding language, you may be more familiar with the term “classes.”

JavaScript also has something called classes — classes are built on prototypes:

class Person {

  constructor(first, last, age, gender, interests) {

    this.name = {

      first,

      last

    };

    this.age = age;

    this.gender = gender;

    this.interests = interests;

  }

}

How To Run JavaScript

Since JavaScript is one of the core technologies of the Internet, every modern web browser will have built-in JavaScript consoles. There are also many web-based JavaScript compilers and interpreters.

Browsers

All the big-name browsers such as Chrome, Firefox, Safari, Internet Explorer, and Opera will have JavaScript consoles. I will explain the process on Google Chrome, but all the other browsers can be found in a similar fashion.

In Chrome, right-click anywhere in your browser window and select “Inspect.” Then click on the console tab. From there, you can write “JavaScript” right into the console. Another keyboard shortcut can be found by pressing Command + Shift + J on Mac and Control + Shift + J on Windows.

Web-Based

There are a lot of different web-based JavaScript consoles. My personal favorite is Repl.it, but other options include JS Bin, JSFiddle, and CodePen. Of course, if you find one that you are more comfortable with, you are welcome to use it. 

Can I teach myself JavaScript?

The short answer is yes. I do truly believe you can learn JavaScript on your own, but as with anything, it will take time and discipline. There may be times when you want to quit, think you’ve had enough, or question if you are doing it correctly. My answer to those questions would be to follow the free options of Codecademy and freeCodeCamp (above) as they are very structured and give a good foundation for learning. Never get discouraged; you will be surprised at how much you actually know!

So… should I learn JavaScript or Python?

This is a loaded question and could be a whole article in itself, but it really comes down to use cases. Almost everything outside of the coding languages of JavaScript and Python is alike. This includes popularity, support, community, free and paid courses, and versatile uses.

I mention use cases because if you intend to do web-based programming, you will most likely need to know JavaScript; if you focus on web programming, I would recommend learning JavaScript.

If you are more interested in data analytics, artificial intelligence, and machine learning, Python may be the route to go. This is not to say you can only learn one language. If you are up for it, learn both! Python and JavaScript have evolved a lot since they were created, and both can be used for websites, data analytics, artificial intelligence, and machine learning.