Welcome to Gaia! ::


Hello, all!

So i'm trying to get into programming as like, a hobby. Hobby meaning not something to take over my life but something fun to do that could earn me some extra cash or a raise or something idk.

My inspiration really is flappy bird, where he said he made it in a few evenings and made about $50,000 a day.

I've done matlab, although I was terrible at it for my foundations of engineering class here at University of South Florida. I also made two scratch games, one where you had to catch the scratch cat but everytime he disappeared somewhere else and you had 10 seconds to get as many taps. Then I made another one, for an english project, where you were the scratch cat and there were 3 floating boxes of cigarettes trying to tag you, and when they were on you, your life drained away.

But i understand, scratch isn't really programming.

So I've done the hour of code on code.org which was more scratch, and I've started watching a free lecture series on programming from MIT shown here. But What I want to know is, how did you learn? Or if you are like me and wanting to learn, how will you do it?
mluck24
So i'm trying to get into programming as like, a hobby. Hobby meaning not something to take over my life but something fun to do that could earn me some extra cash or a raise or something idk.
To be blunt, getting into programming for the money is a bad reason to get into programming. You can certainly get good jobs programming (that can pay very well), but you're not likely to make a lot of money from a hobby.

I'm not saying you shouldn't get into programming (I think everyone should at least give it a try and see if it's for them), I'm just saying you should have realistic expectations.
mluck24
My inspiration really is flappy bird, where he said he made it in a few evenings and made about $50,000 a day.
This was an absolute fluke. Things like this almost never happen. You shouldn't expect to see it happen to you, ever.
mluck24
So I've done the hour of code on code.org which was more scratch, and I've started watching a free lecture series on programming from MIT shown here.
MIT's courses are very good.
mluck24
But What I want to know is, how did you learn?
I grew up with a computer in front of me for most of my life. I had computers before Windows was even a thing that people used, and the computer I had was only useful when you programmed it yourself. I learned entirely by doing.
mluck24
Or if you are like me and wanting to learn, how will you do it?
http://sitwon.github.io/learnproglang/Home.html

This is a set of resources a few of us put together.

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
I second what psychic stalker said.

Also, Scratch is programming. It may look a little different from "traditional" programming languages, but the underlying concepts are the same.

A language like JavaScript is a good one to start with because it can be immediately useful to you. If you use Firefox or Chrome you can write scripts in JavaScript which can manipulate web pages in your browser to enhance or automate your browsing experience. As more and more software is delivered through the browser, JavaScript is increasingly becoming a valuable language to learn.

There's really no wrong language to learn as your first language, but keep yourself interested and engaged, I recommend learning a language which you will be able to use frequently. The more you use it, the more you'll learn.
Alice is a pretty popular way to introduce the fundamentals of object oriented programming. It's free and open source, and you can create animations and games with it.
www.alice.org

Dapper Noob

I haven't truly learned yet, I'm still a learning, beginner if you will. Basically what I learned so far came from the classes at my school, which later developed my own personal interest and me seeking my further learning.

I learn best from books, and challenging exercises. I either get my exercises from books, previous assignments, or online forums.

"Difference between a good coder and a bad coder, is keyboard time" - One of my professors

Good luck!

OG Gekko

9,575 Points
  • The Wolf Within 100
  • Marathon 300
  • Party Animal 100
Just a little advice- You don't want to watch everyone's videos on any programming languages, for they may have bad habits, which you will take from them. For example, in c++, I know a lot of programmers who check their booleans with ==true or ==false, which is pretty pathetic and can cost a company tons of money. You need to find someone who has a lot of recognition in the programming world, or else you won't get anywhere yourself lol. MIT is a good starting place, but you don't want to learn solely from videos. If you can get into any programming classes which give you a challenge, then you'll be on a good starting path.

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Camel Ehsex
For example, in c++, I know a lot of programmers who check their booleans with ==true or ==false, which is pretty pathetic...
In most cases that's unnecessarily verbose, but at the end of the day it's a style thing more than anything.

Camel Ehsex
...and can cost a company tons of money.
Citation needed.
I could see it costing a company some money, but certainly not "tons" of money. I doubt it would even be a significant enough amount of money to be measurable.

OG Gekko

9,575 Points
  • The Wolf Within 100
  • Marathon 300
  • Party Animal 100
Sitwon
Camel Ehsex
For example, in c++, I know a lot of programmers who check their booleans with ==true or ==false, which is pretty pathetic...
In most cases that's unnecessarily verbose, but at the end of the day it's a style thing more than anything.

Camel Ehsex
...and can cost a company tons of money.
Citation needed.
I could see it costing a company some money, but certainly not "tons" of money. I doubt it would even be a significant enough amount of money to be measurable.



mb, wouldn't cost tons, would be inefficient though lol.
Could also be a reason why some company would choose someone else over you if they didnt ==true for a bool and just simply if(bool) instead

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Camel Ehsex
mb, wouldn't cost tons, would be inefficient though lol.
Could also be a reason why some company would choose someone else over you if they didnt ==true for a bool and just simply if(bool) instead
Source files are just text, and text is ridiculously compressible. So we're talking about a very very tiny fraction of bloat. I don't think any company would even notice that.

Generally speaking, you're hired for your results, not for your style. You can write with the most beautiful style in the world, but if your code is buggy, inefficient, or constantly late, then you just won't be a desirable employee.

Of course, your coworkers might get annoyed if they don't like your coding style; but source files are just text, and we've gotten really really good at processing text. Companies or teams that care about such things use scripts to enforce their favored style guidelines. So your code would automatically be corrected to conform to the chosen style when you checked it in. Nobody else would see it so nobody else would care.


Criticizing or looking down on someone else for preferring a different coding style is like assuming someone is less intelligent because they have a speech impediment or speak with a different accent. It's an unfair and often inaccurate prejudice.
Camel Ehsex
mb, wouldn't cost tons, would be inefficient though lol.
Could also be a reason why some company would choose someone else over you if they didnt ==true for a bool and just simply if(bool) instead
This is laughable.

There is no inefficiency in anything you're talking about. At all. The difference in generated machine code is the difference between "jump if zero" and "jump if not zero." Which, in terms of machine code, is a literal difference of exactly one bit. The fact that you would even point this out demonstrates just how poorly you understand what a compiler does with code, and just how little it matters in the real world.

It is exactly as Sitwon says: It's a matter of style. That you think otherwise is hilarious. If I were interviewing you for a job, I'd turn you away precisely because you think this matters.

OG Gekko

9,575 Points
  • The Wolf Within 100
  • Marathon 300
  • Party Animal 100
psychic stalker
Camel Ehsex
mb, wouldn't cost tons, would be inefficient though lol.
Could also be a reason why some company would choose someone else over you if they didnt ==true for a bool and just simply if(bool) instead
This is laughable.

There is no inefficiency in anything you're talking about. At all. The difference in generated machine code is the difference between "jump if zero" and "jump if not zero." Which, in terms of machine code, is a literal difference of exactly one bit. The fact that you would even point this out demonstrates just how poorly you understand what a compiler does with code, and just how little it matters in the real world.

It is exactly as Sitwon says: It's a matter of style. That you think otherwise is hilarious. If I were interviewing you for a job, I'd turn you away precisely because you think this matters.

If this is actually true, then don't blame me lol. That's what I was taught my by coding professor, and I haven't heard any other remarks so I'm obviously ill-informed. I guess my professor might be teaching us some things in his style and telling us that it's important to do it or you'll fail in the real world, just to get us to follow his directions lmao. I'd like to know more about you, would you mind presenting your background?
Camel Ehsex
I'd like to know more about you, would you mind presenting your background?
I mind, but I will say that I've been doing professional software engineering for more than 15 years, in more languages than I care to recount; I've been doing it as a hobby for nearly 25 years; and the C family of languages (including C++) are my "wheelhouse."

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
Camel Ehsex
If this is actually true, then don't blame me lol. That's what I was taught my by coding professor, and I haven't heard any other remarks so I'm obviously ill-informed. I guess my professor might be teaching us some things in his style and telling us that it's important to do it or you'll fail in the real world, just to get us to follow his directions lmao. I'd like to know more about you, would you mind presenting your background?
There was a time in which such things were important. For example, the K&R style seen in "The C Programming Language" was developed out of a need to carefully optimize the number of CPU instructions and the amount of memory/storage being consumed. That was back in the late 70s and early 80s.

In the three decades which have followed, not only have CPUs gotten faster, and memory cheaper and more abundant, but the compiler itself has gotten much more sophisticated at static optimization. So where at one time it made a difference in run-time if you used a for-loop, versus a while-loop, versus an if-statement with a goto... a modern compiler will translate all of that into exactly the same machine code. The GNU GCC C compiler will even do tail-call optimization for you, so you can write a recursive function without worrying about overflowing the stack.

I recommend that you read The Elements of Computing Systems, and perhaps take a course on compiler design. Learn about how the compiler transforms, analyzes, and optimizes your code.

We are living in a post-machine language world. It is almost never relevant anymore to think in terms of CPU instructions. Premature optimization is even considered an evil. In most cases, the compiler will do a smarter job on its own than you could, and in the mean time you're wasting time that you should be using to solve bigger problems.

In this world where we no longer care about CPU instructions, the biggest concerns are correctness and maintainability. The solution to both is expressive, readable source code. If it costs you a few extra bytes to write a function that is readable, understandable, and maintainable; do it. Those extra bytes would be well-spent. Once the compiler gets it's hand on your code they won't make any difference, but in terms of developer-hours spent working on the code base (which are many orders of magnitude more expensive than machine-hours) it could save a company thousands or even millions of dollars. So if it makes it easier to read or understand what a section of code is doing to add "==true" or "==false" then it is the right thing to do, even if it did affect the size of performance (which it doesn't).


I have met many amazing programmers in my life, but psychic stalker is the closest I've ever seen to a C++ expert. I'm still waiting on that book.
Sitwon
We are living in a post-machine language world. It is almost never relevant anymore to think in terms of CPU instructions. Premature optimization is even considered an evil.
Be careful deploying that aphorism. Most people won't understand.

The full quote (from Knuth) is "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."

The implication is not that you shouldn't optimize prematurely, but that you should choose optimizations that have an immediate benefit: Choosing the right data structures and the right algorithms for a given task should be a primary concern, and it is never premature to make that optimization. That's why Agner Fog's Optimiation Guide is valuable. When you understand how a CPU works on a low level and you understand how your compiler generates code, you can make optimal choices.

But that's why I pointed out that making a big deal out of the difference between using "==true" and not is so laughable: It demonstrates a lack of precisely that optimal understanding.
Sitwon
In most cases, the compiler will do a smarter job on its own than you could, and in the mean time you're wasting time that you should be using to solve bigger problems.
... And sometimes it does a poor job. That's why it's valuable to understand what it's doing.
Sitwon
In this world where we no longer care about CPU instructions,
Speak for yourself Java boy.
Sitwon
the biggest concerns are correctness and maintainability. The solution to both is expressive, readable source code. If it costs you a few extra bytes to write a function that is readable, understandable, and maintainable; do it. Those extra bytes would be well-spent. Once the compiler gets it's hand on your code they won't make any difference, but in terms of developer-hours spent working on the code base (which are many orders of magnitude more expensive than machine-hours) it could save a company thousands or even millions of dollars. So if it makes it easier to read or understand what a section of code is doing to add "==true" or "==false" then it is the right thing to do, even if it did affect the size of performance (which it doesn't).
This is exactly, 100% precisely, absolutely right.

8,950 Points
  • Gaian 50
  • Member 100
  • Contributor 150
psychic stalker
Speak for yourself Java boy.

1. Scala, not Java.
2. I haven't touched either in nearly a year. I'm mostly rocking bash and ash these days. (With some Python, JS, and kernel C on the sides.)

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum