Software Development and Programming Careers (Official Discussion Thread)

Double J

Banned
Joined
May 11, 2012
Messages
1,929
Reputation
-655
Daps
5,264
What's the best book to learn Java? I already have a decent amount of experience with it but I really wanna master it.
 

Dat Migo

Superstar
Joined
May 1, 2012
Messages
9,252
Reputation
1,574
Daps
19,623
Reppin
Boston

aaaaaaa

Banned
Joined
Dec 30, 2013
Messages
3,087
Reputation
590
Daps
8,271
I know a bit of programming. Is it possible to make money in it without getting a career in it.

I mean like doing odd jobs or temp work. I don't want a career in the field but I wanna make money in it
 

CELL

All Star
Joined
Jun 15, 2012
Messages
5,057
Reputation
1,785
Daps
9,413
Reppin
NULL
Got a code test for a job interview on Monday brehs.

I'll essentially be building some form of a website in half an hour through a PSD.

Anyone here been through the same process? Any hints or tips on what to do/what not to do?
 

Double J

Banned
Joined
May 11, 2012
Messages
1,929
Reputation
-655
Daps
5,264

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,288
Reputation
5,551
Daps
83,466
Here's some advice for the beginners... Whenever you sit stumped about 'how to proceed', open up your text editing program or IDE and start coding. You can sit around and waste a ton of time trying to figure out the perfect programming language or some other since nonsense. Best thing to do is to mess around with various languages until one of them clicks with you and keep on going hard at it. You won't understand a ton at first, but if you stick with it, it'll start to come to you.
 

Type Username Here

Not a new member
Joined
Apr 30, 2012
Messages
16,368
Reputation
2,385
Daps
32,640
Reppin
humans
Game programming is quite difficult... once you attempt it, you will respect games a lot more. Getting all of these various parts to work in sync is amazing really.

Game programming is essentially pure math. Of course there are engines and apis you can use that obscure that fact, but when it comes down to the nitty gritty it's about math. Calculating the physics, shadows and lighting in these engines are insane.

I have the highest respect for these programmers.
 

Type Username Here

Not a new member
Joined
Apr 30, 2012
Messages
16,368
Reputation
2,385
Daps
32,640
Reppin
humans
If you're new to programming or CS, you'll often hear people talking about run time, timing complexity or Big O notation. What do these terms mean? Why are these concepts important? I'll try to explain it in a basic way.

First, you have to understand the environment of the early days of computing. We are fortunate enough to have very efficient processors, capable of calculating billions of instructions per second. Everything in a modern day computer is highly tuned for the most part. But when some of these algorithms and data structures were invented or discovered, computers had severe limitations (in relation to modern times). Fine tuning algorithms were extremely important to decrease run time or memory usage. Obviously, these concepts are still important in modern times, simply because time is money. Here is a (very) basic and rudimentary demonstration:

I have an array with 100 random numbers. Now for some reason I need to sort the array so the numbers are in order (think of all the applications or programs you use that has to sort or organize data).

I can do it the O(N^2) [n squared or quadratic] way. For example, I can do two loops (one nested inside another) to compare one element to all other elements in the array, and move the current element to its proper location in the order. Think of a unsorted hand of cards (not really a perfect analogy): You pull one card out and compare it to each card in the hand to move it to a proper location.

I can also do it the O(n log n) [ way, which can be a divide-and-conquer algorithm to sort the array. This is essentially breaking down the problem into smaller and smaller subsets (until the subset is 1) and solving it before "bringing it all back together". It sometimes involves recursion, which can be a pretty abstract concept for some to grasp at the beginning.

But what does the "n^2" or "n log n" mean? Well, think of it like this. The "n" is the input size (or size of elements to be sorted in this case). So here is the difference between two running above.

This won't be very accurate in terms of specific math, but you'll get the point. If we take N to be size 100, the N^2 algorithm would take ~10 microseconds to sort while the N log N algorithm would take ~1 microsecond to sort. That may not seem like much of a difference, but when you raise N to be equal to 1 Billion, this is what we get:

N log N sorting algorithm = ~ 30 Seconds to sort
N^2 sorting algorithm = ~ 30 YEARS to sort

So, with the same input size of one billion items to sort, we can see the drastic difference in time just by implementing a different algorithm( since the hardware remains the same). Just a basic overview, not meant to be extremely accurate.




 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,288
Reputation
5,551
Daps
83,466
This is the kind of discussiosn
If you're new to programming or CS, you'll often hear people talking about run time, timing complexity or Big O notation. What do these terms mean? Why are these concepts important? I'll try to explain it in a basic way.

First, you have to understand the environment of the early days of computing. We are fortunate enough to have very efficient processors, capable of calculating billions of instructions per second. Everything in a modern day computer is highly tuned for the most part. But when some of these algorithms and data structures were invented or discovered, computers had severe limitations (in relation to modern times). Fine tuning algorithms were extremely important to decrease run time or memory usage. Obviously, these concepts are still important in modern times, simply because time is money. Here is a (very) basic and rudimentary demonstration:

I have an array with 100 random numbers. Now for some reason I need to sort the array so the numbers are in order (think of all the applications or programs you use that has to sort or organize data).

I can do it the O(N^2) [n squared or quadratic] way. For example, I can do two loops (one nested inside another) to compare one element to all other elements in the array, and move the current element to its proper location in the order. Think of a unsorted hand of cards (not really a perfect analogy): You pull one card out and compare it to each card in the hand to move it to a proper location.

I can also do it the O(n log n) [ way, which can be a divide-and-conquer algorithm to sort the array. This is essentially breaking down the problem into smaller and smaller subsets (until the subset is 1) and solving it before "bringing it all back together". It sometimes involves recursion, which can be a pretty abstract concept for some to grasp at the beginning.

But what does the "n^2" or "n log n" mean? Well, think of it like this. The "n" is the input size (or size of elements to be sorted in this case). So here is the difference between two running above.

This won't be very accurate in terms of specific math, but you'll get the point. If we take N to be size 100, the N^2 algorithm would take ~10 microseconds to sort while the N log N algorithm would take ~1 microsecond to sort. That may not seem like much of a difference, but when you raise N to be equal to 1 Billion, this is what we get:

N log N sorting algorithm = ~ 30 Seconds to sort
N^2 sorting algorithm = ~ 30 YEARS to sort

So, with the same input size of one billion items to sort, we can see the drastic difference in time just by implementing a different algorithm( since the hardware remains the same). Just a basic overview, not meant to be extremely accurate.



Thanks for the post. This is the kind of discussion we need to be having in here to really make it productive.

I have the utmost respect for game programmers as well. They were responsible for a lot of the technological advances, especially when it comes to real time 3d. It'll be a long time before I become competent enough to be a 3d programmer. A book for the necessary math for 3d games is nearly 800 pages
amazon.com/Math-Primer-Graphics-Development-Edition/dp/156881723

For now, I'll be stuck in the 2d realm, which is difficult enough lol.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,288
Reputation
5,551
Daps
83,466
Another piece of advice I have for beginners is to accept yourself making garbage code initially and improve through iterations... In other words, when you first write something, it's going to be sloppy. It's not going to be beautiful code that aligns with all of the best practices. You simply have to explore and even if your code looks nasty, work with it until it works, and then go back and improve it through iterations. When you're starting, you can waste a lot of time trying to come out with some perfect, beautiful code, and eventually discourage yourself from even starting in the first place.

As you get more skilled, then you can start making a lot better looking and more maintainable code from the get-go... but most importantly, when you're first starting, get into the mix and accept you're not going to do perfect work.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,288
Reputation
5,551
Daps
83,466
I always find it great to further your understanding by taking time to reflect on what you've been learning, so I'll do that here and hopefully someone can pick up something of value in the process.

I'm spending a bit of time reading up on Java. It's quite interesting comparing and contrasting Java and Javascript. Java is much more verbose in that you have to declare types, but on the other hand, to emulate certain features such as "private methods and properties", you have to do some long, drawn out procedure such as using closures.

In Javascript, there's no need to structure everything in terms of classes. In fact, up to ES5 (Ecmascript 5) which is the formal standard Javascript is based on, there are no classes. Everything is based upon prototypal inheritance, which involves 'chaining' objects together. You can emulate class-based OO in Javascript, but it's best to embrace prototypal inheritance for what it is.

In Javascript, object constructors are just regular functions which you use the 'new' keyword in front of when you create an instance of an object. Creating an instance of an object, or in other words 'instantiating' an object, means that you take a constructor, which is essentially an object template/blueprint, and create an actual object based off of it... For example, let's start off with a Car constructor. The purpose of a constructor is to help create objects of a similar kind. It can be tedious doing something like
var porshe;
porshe.wheels = 4;
porshe.speed = 40;

var camaro;
camaro.wheels = 4;
camaro.speed = 20;

Instead, you can use a constructor and make the process much simpler. Here is the constructor:

function Car (wheels, speed)
{
this.wheels = wheels;
this.speed = speed;
}

Then you create instances of the object by calling this constructor function
var ferrari = new Car(4, 20);

This is equivalent to
var ferrari;
ferrari.wheels = 4;
ferrari.speed = 20;

As you can imagine, when the list of properties similar objects have gets longer, using constructors is very handy. How all of this would be setup in Java would be quiet different.I'll speak more on that as I get more proficient with Java. But let's continue on to prototypes. Each constructor has a prototype property, which is an object, which you use to share properties and methods between all objects instantiated from that constructor... Let's take the constructor we used above and revisit it.

function Car (wheels, speed)
{
this.wheels = wheels;
this.speed = speed;
}

Now, you can alter the prototype property of Car by typing in individual properties or by passing it an object... for example:

Car.prototype.drive = function() {
console.log(this.car + "is driving.");
}

Car.prototype.color = "blue";

Now when an object is instantiated from a constructor, the methods and properties it receives from the constructor is exclusive to that object. On the other hand,methods and properties it gains from the prototype are shared between all objects from that particular constructor. If you change the prototype property, ALL objects that reference that prototype will be changed.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,288
Reputation
5,551
Daps
83,466
Right now...I am just playing around with 'python'...lets see where it takes me.

That's actually the language I started off with before I moved on to Javascript. It's being used a lot now in universities. Are you using version 2 or 3?
 
Top