Meet the Arduino
Ah the Arduino! This simple design has revolutionized the electronics hobbyist market and turned these hobbyist into "makers". Simple to use and easy to program, what more can you ask for from a development platform. Well allot actually but we will get to that later. So what is an Arduino? Is it an electronics board? Is it a programming language? Is it integrated development environment? Well it's all of the above actually. The board you normally see as "the Arduino board" is actually one of their boards called the Arduino Uno and the IDE is custom designed open source programming environment.
The Arduino developers designed Arduino as a learning platform for their college students to learn how to design embedded systems and get started in programming microcontrollers. Due to the popularity of the new platform, they decided to release it to the rest of the world and the rest is history after that. For a more detailed description of the history of the Arduino platform, check out their Wikipedia site here.
So how does Arduino work? Well lets focus this on the Uno, the Uno is actually a single board computer with an Atmel ATMEGA328P microcontroller installed with custom designed USB to TTL converter built in. This is the hardware interface for connecting the Uno to your PC. The microcontroller has a bootloader (we will come back to this) installed in it when you receive your Uno board. The bootloader is a small program located in a section of memory on the microcontroller and is designed to receive the information coming in on the serial port and moves that information to the flash memory portion of the microcontroller. This information that is moved to the flash portion of the microcontroller is the program that you write.
The IDE is a compiler, linker and programmer all-in-one program that helps you to compile and upload your code into the microcontroller. So when you are finished writing your code, you press the upload button on the IDE, the IDE will compile your program and upload it to the microcontroller. The program will then run on the microcontroller automatically! That is one reason why the Arduino is so popular because it is that easy to use.
Other microcontroller companies have complicated IDE's and tools that take up allot of space and require patching your compiler, linker, programmer and etc. Also they charge for their compilers or give you a limited free version where you are limited to the code size you are allowed to compile. Arduino IDE is completely free! All you pay for is the board however with a little bit of knowledge, you can make your own Uno board very easily and cheaply.
So all of this sounds good but there has to be a catch somewhere. Well there is and that is the debugger, it simply doesn't have one. However it does have a serial terminal that can be used to display messages to you. For example, you can have it print a line every time it performs a function. In more complicated IDE's, you have direct access to the memory locations and can stop the program at almost any point in the code space. So if you have a problem, you can find it allot faster than you can by using the terminal alone. That being said, I have been using Arduino in my designs for over 10 years now and I have only ran into one time where I couldn't use the terminal for troubleshooting.
If you are looking to get into the embedded world of development, Arduino is a great way to get started. It's cheap and because its open source, there is a massive community of developers who can help you when you need it.
GeekFeather
Saturday, August 3, 2019
Wednesday, March 27, 2019
What Programming Language Should I Learn First?
The most common question I get asked from people who want to learn how to program is “What programming language should I learn first?”. Most people expect me to say something like as, “Start with programming language ‘X’.” or “I started with ‘X’, then ‘Y’ and etc….”.
If you are reading this then more than likely you're wanting to learn how to write software applications (commonly referred to as programming) and looking for a place to start. Perhaps you are thinking about going to college and want to get a head start or you have a business and need a software application or website or you just want to learn how to program because you are thinking about changing careers etc. Regardless of the reason you are here for an answer.
When I am asked “What programming language should I learn first?” Instead of giving them an answer, first I respond with a question. “What are you wanting to do?” Whereas, most experienced programmers usually say, “start with C first because most of the programming languages are based on C” and that is what they started on back in the good ole days of terminal computers. Others would say, “ learn Python because there are so many free learning tools available online and the Python community is really large”. Both of these answers are good answers and hold some of merit but I respectfully don't agree.
The purpose of this question is to find out if they really NEED to learn how to program in the first place. Allot of times people don’t realize that there are tools available (and most are free) to help them do what they want or the program has already been done so there isn’t a need to reinvent the wheel.
Is there really a need to learn programming?
The question is do you really need to learn how to write software? If all you want to do is make a website for your business, blog, or whatever then there are plenty of website building tools online and most of them are free! There is no reason to learn the intricacies of client side and server side web programming languages if you don’t plan on being a web programmer. You will end up frustrated and pay someone else to do it for you or not do it at all.
However if you are planning on starting the next big social media website then you should learn all you can about social media websites and the programming language(s) needed to make them. Maybe you are wanting to become a game designer then you will need to know all the languages associated with the game engines available.
Where do I start then?
Once you decide what it is you want to do, research what language (or languages) you will need to learn in order to create the software needed for the purpose you are writing software for. Most of the information you will be researching can be found online and usually the tools needed are available for free or at really low cost. If you still need more information, look for other people or companies that are already doing or doing something similar to what you want to do and ask them what languages and tools they use.
The next thing to do is once you know what software will be the most applicable to create your application, look online and find some tutorials on how to write programs for that language. Another option is to buy a book on the subject. Look around your area for a college bookstore. Allot of times, they have books they can’t use because the instructor changed the book and now the bookstore has excess stock so they will sell them at a discount. Another thing I recommend is sign up for a forum that specializes in the programming language you want to learn, read and ask questions.
To answer the question (kinda)
It is estimated that there are over 20,000 programming languages on this planet and they all have their strengths and weaknesses. For example Python is a very powerful scripting language heavily used on Google’s search engine and applications. Python is also used in the back end applications on most Linux operating systems. However if you are wanting to make a video game for the latest game consoles, then Python would not be the language to learn. Most game engines use C/C++.
Common Programming Languages
Below is a short list of the most popular programming languages and what they are most commonly used for to help you get an idea of where to start.
C/C++ Programming Language
This is the language that most programming languages are based on. It is very versatile and you can program just about anything with them. ‘C’ is used allot in programming microcontrollers and drivers for operating systems. It is a "low level" programming language and has a pretty steep learning curve. C++ is the object oriented version of C and is used mostly in things like Operating System sub-processes, game engines, 3D modelling programs and now it’s starting to find its way into the embedded systems world.
Java
Java is a very useful programming language and it is cross platform (which means it runs on most major operating systems that support the Java Runtime Environment) and has a very large knowledge base. Java has lately found its way in the smartphone industry and has now become one the most popular and widely used programming languages in the world and one of the highest paid too! This is a great first language to learn and there are allot of free tools for learning to program in Java and actually creating real Java applications.
The downside to Java I would say would be how big the programming language actually is. There are libraries for everything and object oriented programming in general is a little tricky to get the hang of with things like inheritance, constructors, deconstructors and etc.
Python
As stated above, the most complex web applications use Python. Python is not as easy as most people think it is to learn and I don’t recommend it as a first language because it’s more of a scripting language than actual programming. Also it’s very specific in what it was designed for and therefore limiting. But what it's designed to do, it does very well. The tools are free and the knowledge base is very large but I personally do not think a beginning programmer should start with this language.
One reason I would caution a person to learn this language first is the tab based function encapsulation. Without brackets, this can become confusing as a person would not typically learn to tab over to encapsulate or even nest functions.
HTML/CSS/JAVASCRIPT/PHP/MYSQL updated: HTML5
If you are wanting to be a web programmer, then these scripting languages are a must! They are simple to learn, the tools are already installed on your computer (except PHP and MYSQL), and the knowledge base is extremely large (arguably the largest of all the programming languages). This is a very competitive market as most entry level programmers know these languages inside and out. Most of the people who take the time to learn these languages do so for their own websites benefit or to start a web programming business.
I would say that this is a fun scripting environment to learn because it’s very simple and you see results immediately. I personally have used these languages as front end for larger more complex back end applications as they are easier then hard coding a user interface.
In conclusion
To restate the question, “What programming language should I learn first” is not as simple as saying, "start with this language or that one." Instead, ask yourself, "What is it I want to do and is this something I want to spend allot of my time doing?"
Leave a comments below about what you would recommend as a first language. Lets see what the world has to say about this.
If you are reading this then more than likely you're wanting to learn how to write software applications (commonly referred to as programming) and looking for a place to start. Perhaps you are thinking about going to college and want to get a head start or you have a business and need a software application or website or you just want to learn how to program because you are thinking about changing careers etc. Regardless of the reason you are here for an answer.
When I am asked “What programming language should I learn first?” Instead of giving them an answer, first I respond with a question. “What are you wanting to do?” Whereas, most experienced programmers usually say, “start with C first because most of the programming languages are based on C” and that is what they started on back in the good ole days of terminal computers. Others would say, “ learn Python because there are so many free learning tools available online and the Python community is really large”. Both of these answers are good answers and hold some of merit but I respectfully don't agree.
The purpose of this question is to find out if they really NEED to learn how to program in the first place. Allot of times people don’t realize that there are tools available (and most are free) to help them do what they want or the program has already been done so there isn’t a need to reinvent the wheel.
Is there really a need to learn programming?
The question is do you really need to learn how to write software? If all you want to do is make a website for your business, blog, or whatever then there are plenty of website building tools online and most of them are free! There is no reason to learn the intricacies of client side and server side web programming languages if you don’t plan on being a web programmer. You will end up frustrated and pay someone else to do it for you or not do it at all.
However if you are planning on starting the next big social media website then you should learn all you can about social media websites and the programming language(s) needed to make them. Maybe you are wanting to become a game designer then you will need to know all the languages associated with the game engines available.
Where do I start then?
Once you decide what it is you want to do, research what language (or languages) you will need to learn in order to create the software needed for the purpose you are writing software for. Most of the information you will be researching can be found online and usually the tools needed are available for free or at really low cost. If you still need more information, look for other people or companies that are already doing or doing something similar to what you want to do and ask them what languages and tools they use.
The next thing to do is once you know what software will be the most applicable to create your application, look online and find some tutorials on how to write programs for that language. Another option is to buy a book on the subject. Look around your area for a college bookstore. Allot of times, they have books they can’t use because the instructor changed the book and now the bookstore has excess stock so they will sell them at a discount. Another thing I recommend is sign up for a forum that specializes in the programming language you want to learn, read and ask questions.
To answer the question (kinda)
It is estimated that there are over 20,000 programming languages on this planet and they all have their strengths and weaknesses. For example Python is a very powerful scripting language heavily used on Google’s search engine and applications. Python is also used in the back end applications on most Linux operating systems. However if you are wanting to make a video game for the latest game consoles, then Python would not be the language to learn. Most game engines use C/C++.
Common Programming Languages
Below is a short list of the most popular programming languages and what they are most commonly used for to help you get an idea of where to start.
C/C++ Programming Language
This is the language that most programming languages are based on. It is very versatile and you can program just about anything with them. ‘C’ is used allot in programming microcontrollers and drivers for operating systems. It is a "low level" programming language and has a pretty steep learning curve. C++ is the object oriented version of C and is used mostly in things like Operating System sub-processes, game engines, 3D modelling programs and now it’s starting to find its way into the embedded systems world.
Java
Java is a very useful programming language and it is cross platform (which means it runs on most major operating systems that support the Java Runtime Environment) and has a very large knowledge base. Java has lately found its way in the smartphone industry and has now become one the most popular and widely used programming languages in the world and one of the highest paid too! This is a great first language to learn and there are allot of free tools for learning to program in Java and actually creating real Java applications.
The downside to Java I would say would be how big the programming language actually is. There are libraries for everything and object oriented programming in general is a little tricky to get the hang of with things like inheritance, constructors, deconstructors and etc.
Python
As stated above, the most complex web applications use Python. Python is not as easy as most people think it is to learn and I don’t recommend it as a first language because it’s more of a scripting language than actual programming. Also it’s very specific in what it was designed for and therefore limiting. But what it's designed to do, it does very well. The tools are free and the knowledge base is very large but I personally do not think a beginning programmer should start with this language.
One reason I would caution a person to learn this language first is the tab based function encapsulation. Without brackets, this can become confusing as a person would not typically learn to tab over to encapsulate or even nest functions.
HTML/CSS/JAVASCRIPT/PHP/MYSQL updated: HTML5
If you are wanting to be a web programmer, then these scripting languages are a must! They are simple to learn, the tools are already installed on your computer (except PHP and MYSQL), and the knowledge base is extremely large (arguably the largest of all the programming languages). This is a very competitive market as most entry level programmers know these languages inside and out. Most of the people who take the time to learn these languages do so for their own websites benefit or to start a web programming business.
I would say that this is a fun scripting environment to learn because it’s very simple and you see results immediately. I personally have used these languages as front end for larger more complex back end applications as they are easier then hard coding a user interface.
In conclusion
To restate the question, “What programming language should I learn first” is not as simple as saying, "start with this language or that one." Instead, ask yourself, "What is it I want to do and is this something I want to spend allot of my time doing?"
Leave a comments below about what you would recommend as a first language. Lets see what the world has to say about this.
How to get started in programming
So you decided you want to learn how to write software or "program"? Congratulations you have now entered a world of excitement, frustration, sleepless nights and coffee addiction. Joking aside, programming is a very rewarding (and lucrative) hobby/career. The problem is you need to know how and where to start. Fortunately I have been there too and can guide you through this process.
This article will help guide you in getting started to learn how to program but it doesn't teach you how to program. For that, you should read my article on "How to program" (coming soon).
Step 1: Pick a project
The first thing you have to do is decide what it is you are wanting to learn programming for. For example do you want to build websites? Do you want to make apps for cell phones or perhaps you are wanting to make a point of sale system for your friends startup trinket business. Whatever the reason, you need to make a decision on a project and stick with it. This step is critical in learning how to program because it gives you a goal to write the software for and in turn keeps you focused.
If you don't have a project to work on, you will window up writing small programs that don't really do anything or you won't program at all. It's like saying you want to build a car but don't pick a make and model. You will end up with a garage full of random car parts and no car.
Step 2: Research the language(s) required for the project you are going to do
This is an important step that can lead you down many paths of programming language types. For example, building a website can be done using HTML (with JavaScript and CSS), PHP (with HTML, JavaScript and CSS), Python, Java, and .Net just to name a few. Most programs are written using multiple languages that interact with each other.
For example a simple website can be build with just HTML (Hyper Text Markup Language) and it will look decent but very dated. If you want it to look like a professional website with drop down menus and slide shows, you add CSS (Cascading Style Sheet). If you want to add more interaction from the user, you add JavaScript. The point is, each language has its own unique aspects and can do cool things but together they can do some pretty awesome things.
Step 3: Setup your environment
When working with a programming language usually all you need is a text editor and compiler and you can do allot with just these but today we are blessed with IDE's (Integrated Development Environments) that help keep your source code organized and easier to navigate. Depending on the software application you are using, you may have to use a specific IDE supplied by the software environment.
But before you go downloading and installing IDE's I recommend getting a separate computer for this because you are more than likely going to downloading, installing and uninstalling multiple IDE's. This could potentially could slow down your computer if not make it crash because most of the IDE's out there are open source and could potentially effect your operating system. Another option would be to download a virtual machine and install Linux on the virtual machine.
Another good thing to do is if you are not a fast typing person, you may want to get better at typing as you will be doing this allot with writing source code. It's not a mandatory step but it would be helpful.
Step 4: Getting started
OK so you have your project in mind, the programming language you are going to use and your IDE is setup and ready to go. Now lets start writing that source code! Oh wait, you still don't know how to program yet. This is where you will start your journey on learning how to program.
First start with some simple text based programs to get you familiar with the language and the programming environment. A good place to get some learning tools is at a college bookstore. Speak with the staff there about old textbooks they may have. Allot of times, a professor will change their textbook from one semester to the next leaving an access inventory of books that the bookstore cannot sell and will usually sell them at a reduced price.
These are the small programs I recommend getting started with.
Computer programming projects:
1. Simple command line calculator
2. Complex command line calculator
3. Simple calculator with a user interface (window)
4. Complex calculator with a user interface (window)
5. Command line cash register system that calculates sales tax and discounts
6. Command line inventory management system
7. Command line cash register system that works with your inventory management system
8. Cash register system with user interface
9. Inventory management system with user interface
10. Cash register system that works with your inventory management system with a user interface
Website programming projects:
1. Simple HTML based website
2. Complex HTML based website with tables, video, pictures and etc.
3. Take your complex HTML based website and add CSS code to the layout and text
4. Make a CSS drop down menu
5. Make a CSS slide show
6. Add JavaScript to the website to enhance the drop down menu and the slide show
7. Setup a PHP server
8. Convert your HTML site into a PHP site
9. Setup a MySQL server
10. Create a blog site
Step 5: Start your project
By now you should have most of the tools and knowledge you need to start your project. Once you get started on this project and start adding more complexity to it, you will find you will be learning more and more as you go on. This is what programming is all about, research, learn and do. That is the only way you will learn how to program is by researching the problem you are having, learning how to correct it and then do it!
Remember programming is fun and rewarding but it can be very frustrating at times as well. Stick to it and keep learning. As an experienced programmer I can tell you first hand, that programming is an ongoing learning experience and you will keep learning as long as you keep programming but most importantly, HAVE FUN!
This article will help guide you in getting started to learn how to program but it doesn't teach you how to program. For that, you should read my article on "How to program" (coming soon).
Step 1: Pick a project
The first thing you have to do is decide what it is you are wanting to learn programming for. For example do you want to build websites? Do you want to make apps for cell phones or perhaps you are wanting to make a point of sale system for your friends startup trinket business. Whatever the reason, you need to make a decision on a project and stick with it. This step is critical in learning how to program because it gives you a goal to write the software for and in turn keeps you focused.
If you don't have a project to work on, you will window up writing small programs that don't really do anything or you won't program at all. It's like saying you want to build a car but don't pick a make and model. You will end up with a garage full of random car parts and no car.
Step 2: Research the language(s) required for the project you are going to do
This is an important step that can lead you down many paths of programming language types. For example, building a website can be done using HTML (with JavaScript and CSS), PHP (with HTML, JavaScript and CSS), Python, Java, and .Net just to name a few. Most programs are written using multiple languages that interact with each other.
For example a simple website can be build with just HTML (Hyper Text Markup Language) and it will look decent but very dated. If you want it to look like a professional website with drop down menus and slide shows, you add CSS (Cascading Style Sheet). If you want to add more interaction from the user, you add JavaScript. The point is, each language has its own unique aspects and can do cool things but together they can do some pretty awesome things.
Step 3: Setup your environment
When working with a programming language usually all you need is a text editor and compiler and you can do allot with just these but today we are blessed with IDE's (Integrated Development Environments) that help keep your source code organized and easier to navigate. Depending on the software application you are using, you may have to use a specific IDE supplied by the software environment.
But before you go downloading and installing IDE's I recommend getting a separate computer for this because you are more than likely going to downloading, installing and uninstalling multiple IDE's. This could potentially could slow down your computer if not make it crash because most of the IDE's out there are open source and could potentially effect your operating system. Another option would be to download a virtual machine and install Linux on the virtual machine.
Another good thing to do is if you are not a fast typing person, you may want to get better at typing as you will be doing this allot with writing source code. It's not a mandatory step but it would be helpful.
Step 4: Getting started
OK so you have your project in mind, the programming language you are going to use and your IDE is setup and ready to go. Now lets start writing that source code! Oh wait, you still don't know how to program yet. This is where you will start your journey on learning how to program.
First start with some simple text based programs to get you familiar with the language and the programming environment. A good place to get some learning tools is at a college bookstore. Speak with the staff there about old textbooks they may have. Allot of times, a professor will change their textbook from one semester to the next leaving an access inventory of books that the bookstore cannot sell and will usually sell them at a reduced price.
These are the small programs I recommend getting started with.
Computer programming projects:
1. Simple command line calculator
2. Complex command line calculator
3. Simple calculator with a user interface (window)
4. Complex calculator with a user interface (window)
5. Command line cash register system that calculates sales tax and discounts
6. Command line inventory management system
7. Command line cash register system that works with your inventory management system
8. Cash register system with user interface
9. Inventory management system with user interface
10. Cash register system that works with your inventory management system with a user interface
Website programming projects:
1. Simple HTML based website
2. Complex HTML based website with tables, video, pictures and etc.
3. Take your complex HTML based website and add CSS code to the layout and text
4. Make a CSS drop down menu
5. Make a CSS slide show
6. Add JavaScript to the website to enhance the drop down menu and the slide show
7. Setup a PHP server
8. Convert your HTML site into a PHP site
9. Setup a MySQL server
10. Create a blog site
Step 5: Start your project
By now you should have most of the tools and knowledge you need to start your project. Once you get started on this project and start adding more complexity to it, you will find you will be learning more and more as you go on. This is what programming is all about, research, learn and do. That is the only way you will learn how to program is by researching the problem you are having, learning how to correct it and then do it!
Remember programming is fun and rewarding but it can be very frustrating at times as well. Stick to it and keep learning. As an experienced programmer I can tell you first hand, that programming is an ongoing learning experience and you will keep learning as long as you keep programming but most importantly, HAVE FUN!
Subscribe to:
Posts (Atom)
Most Viewed Post
-
The most common question I get asked from people who want to learn how to program is “What programming language should I learn first?”. Most...
-
So you decided you want to learn how to write software or "program"? Congratulations you have now entered a world of excitement, f...