Software Development and Programming Careers (Official Discussion Thread)

Data-Hawk

I have no strings on me.
Joined
May 6, 2012
Messages
8,420
Reputation
1,985
Daps
16,303
Reppin
Oasis
On another note, does anyone use Vim? I hear about a lot of people using it, but I'm curious as to what makes it so great. It supposedly has a steep learning curve, so is it worth it to learn it over just using a text editor/ide?

Mostly Linux programmers( might be a win32 port ), no need for it unless you want to be "elite". Programming is hard enough, to me it makes no sense to have your programming tool add an extra layer of difficulty.
 

Liu Kang

KING KILLAYAN MBRRRAPPÉ
Supporter
Joined
May 3, 2012
Messages
13,670
Reputation
5,473
Daps
29,714
Mostly Linux programmers( might be a win32 port ), no need for it unless you want to be "elite". Programming is hard enough, to me it makes no sense to have your programming tool add an extra layer of difficulty.
And gedit works well enough IMO.
 

yseJ

Empire strikes back
Joined
Apr 30, 2012
Messages
44,310
Reputation
2,516
Daps
63,628
Reppin
The Yay
Ill say this, if you do *nix programming a good amount, theres hardly a more universally accepted text editor out there than vim. if you claim you use linux a lot and dont know vim, people will look at you like :leostare:

if you dont do a lot of programming in linux, chances are you'll use it a few times, trip out and forget most key combinations besides main ones and be very slow the next time you use it.

hell, I had a patch in my career when I did a portable project in C++ in visual studio but let the automatic production handle the linux/solaris builds, so I barely used linux machines for nearly a year. I forgot a ton of vim commands. of course, the most useful ones I remembered well, but I had to look up a few things here and there. like specific regex substitution stuff (like after not using vim for a yea it was faster for me just to use sed in bash than googling exact pattern for vim)
 

yseJ

Empire strikes back
Joined
Apr 30, 2012
Messages
44,310
Reputation
2,516
Daps
63,628
Reppin
The Yay
What trips me up about Javascript is how strange OO programming is in it. The 'this' keyword can be headache inducing as well.
With JS, you don't have to declare data types. Your data-type is determined by the interpreter once you assign the variable.
its dynamically typed, just like python

there are pros and cons of doing that. one big con is that if you mistakenly do something you arent supposed to do with a type you will only get the error generally in run-time
languages like c++ are statically typed so they will give you error in compile time

then theres mixtures
a language like C# (since NET 4.0) has keyword dynamic variables, which can be type-independent, but in general unless you know what you're doing Id still recommend strong types and using reflection and casting.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
its dynamically typed, just like python

there are pros and cons of doing that. one big con is that if you mistakenly do something you arent supposed to do with a type you will only get the error generally in run-time
languages like c++ are statically typed so they will give you error in compile time

then theres mixtures
a language like C# (since NET 4.0) has keyword dynamic variables, which can be type-independent, but in general unless you know what you're doing Id still recommend strong types and using reflection and casting.

What makes JS strange is the prototypal system and having to use closures to keep things out of the global scope. Here is Typescript code, which is a superset of ES6, and after, here is ES5 code

Code:
class Greeter {
  greeting: string;
  constructor(message: string) {
  this.greeting = message;
  }
  greet() {
  return "Hello, " + this.greeting;
  }
}

class Greeter2 extends Greeter {}

var greeter = new Greeter("world");

var button = document.createElement('button');
button.textContent = "Say Hello";
button.onclick = function() {
  alert(greeter.greet());
}

document.body.appendChild(button);

The above is clear and easy to understand
Code:
var __extends = (this && this.__extends) || function (d, b) {
  for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  function __() { this.constructor = d; }
  __.prototype = b.prototype;
  d.prototype = new __();
};
var Greeter = (function () {
  function Greeter(message) {
  this.greeting = message;
  }
  Greeter.prototype.greet = function () {
  return "Hello, " + this.greeting;
  };
  return Greeter;
})();
var Greeter2 = (function (_super) {
  __extends(Greeter2, _super);
  function Greeter2() {
  _super.apply(this, arguments);
  }
  return Greeter2;
})(Greeter);
var greeter = new Greeter("world");
var button = document.createElement('button');
button.textContent = "Say Hello";
button.onclick = function () {
  alert(greeter.greet());
};
document.body.appendChild(button);

The ES5 equivalent is much more difficult to read and understand. I'm very happy that ES6 is finally adding the class keyword and that we won't have to spend time worrying about things like the above code.
 
Last edited:

yseJ

Empire strikes back
Joined
Apr 30, 2012
Messages
44,310
Reputation
2,516
Daps
63,628
Reppin
The Yay
What makes JS strange is the prototypal system and having to use closures to keep things out of the global scope. Here is Typescript code, which is a superset of ES6, and after, here is ES5 code

Code:
class Greeter {
  greeting: string;
  constructor(message: string) {
  this.greeting = message;
  }
  greet() {
  return "Hello, " + this.greeting;
  }
}

class Greeter2 extends Greeter {}

var greeter = new Greeter("world");

var button = document.createElement('button');
button.textContent = "Say Hello";
button.onclick = function() {
  alert(greeter.greet());
}

document.body.appendChild(button);

The above is clear and easy to understand
Code:
var __extends = (this && this.__extends) || function (d, b) {
  for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  function __() { this.constructor = d; }
  __.prototype = b.prototype;
  d.prototype = new __();
};
var Greeter = (function () {
  function Greeter(message) {
  this.greeting = message;
  }
  Greeter.prototype.greet = function () {
  return "Hello, " + this.greeting;
  };
  return Greeter;
})();
var Greeter2 = (function (_super) {
  __extends(Greeter2, _super);
  function Greeter2() {
  _super.apply(this, arguments);
  }
  return Greeter2;
})(Greeter);
var greeter = new Greeter("world");
var button = document.createElement('button');
button.textContent = "Say Hello";
button.onclick = function () {
  alert(greeter.greet());
};
document.body.appendChild(button);

The ES5 equivalent is much more difficult to read and understand. I'm very happy that ES6 is finally adding the class keyword and that we won't have to spend time worrying about things like the above code.
ah I see. this reminds me of when theres need to simulate classes in C, you have to work with function pointers. its nothing too bad, but can be hard to read.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590
Slowly, but surely, I'm starting to get a hang of this MVC thing. It's pretty interesting how there is MVC on both the front-end and server-side.

As far as I understand: MVC (Model-View-Controller)
In a server-side focused MVC app, the client makes a request, the URL is parsed by the router and the router maps that URL to the appropriate controller. The controller is usually a function that contains business logic and it will alter the model if necessary. Models are various representation of business resources, whether it be users, products, etc. Once the model is altered, the model interacts with the database if necessary. The controller then sends back all necessary information to the view, and that is sent back to the client.
 

selam

Banned
Joined
May 2, 2012
Messages
473
Reputation
-545
Daps
558
Reppin
NULL
I would say that working on small projects helps in learning a language.

Try to learn buy designing something that does something, and does it completely....

Then try to design something that does something more... If your last project was interesting you can make it a part of the new bigger project.

A calculator would be a good example of what I am trying to say.
 

Data-Hawk

I have no strings on me.
Joined
May 6, 2012
Messages
8,420
Reputation
1,985
Daps
16,303
Reppin
Oasis
Aight brehs. Time to get back into C++. I probably haven't written a single line of C++ since I was a teenager.

Why learn C++ ( again )?, well my dream job is to work on 3D engines and Bethesda Studio's is right up the street. Long road ahead to get to that level. But have to start somewhere. Plus I've always been curious about ray tracers, BSP, Lighting, Physics etc. Time to get to work.
 

kevm3

follower of Jesus
Supporter
Joined
May 2, 2012
Messages
16,300
Reputation
5,571
Daps
83,590

MewTwo

Freeing Pokemon From Their Masters Since 1996
Joined
May 23, 2012
Messages
9,541
Reputation
-1,427
Daps
19,477
Reppin
Cerulean Cave
Does anyone here actually code for fun? (as a hobby) or forced to because of work?
 

Silver Surfer

Veteran
Joined
May 1, 2012
Messages
36,979
Reputation
-4,863
Daps
83,385
Slowly, but surely, I'm starting to get a hang of this MVC thing. It's pretty interesting how there is MVC on both the front-end and server-side.

As far as I understand: MVC (Model-View-Controller)
In a server-side focused MVC app, the client makes a request, the URL is parsed by the router and the router maps that URL to the appropriate controller. The controller is usually a function that contains business logic and it will alter the model if necessary. Models are various representation of business resources, whether it be users, products, etc. Once the model is altered, the model interacts with the database if necessary. The controller then sends back all necessary information to the view, and that is sent back to the client.


That all our front ends are here.....

We have a static VIEW .ejs page that has all the html/css elements

We use a CONTROLLER .js file that has the "logic" that manipulates the view and calls the model when necessary

We use a MODEL folder that has all the .js file that do all the AJAX calls to the server


Nice and Neat :smile:
 
Top