Self-taught programmers

Status
Not open for further replies.

fitten

Ars Legatus Legionis
55,636
Subscriptor++
[url=http:/civis/viewtopic.php?p=31584955#p31584955:72jz6jrj said:
Apteris[/url]":72jz6jrj]"Wholeheartedly." ;)

And I'm not sure passion is required, to be a very good developer. Merely dedication and professionalism.

I know a guy who is a developer that I respect quite a bit. I wouldn't say he was passionate about computers at all but when given a task, he is thorough, professional, and methodical. He's more like a machine.... never jumps to conclusions, etc. I've never gotten the impression that he's ever coded/debugged by gut feel.
 

TomXP411

Ars Tribunus Angusticlavius
9,356
[url=http:/civis/viewtopic.php?p=31584625#p31584625:282rdhio said:
KallDrexx[/url]":282rdhio]
[url=http:/civis/viewtopic.php?p=31583315#p31583315:282rdhio said:
TomXP411[/url]":282rdhio]
So I'm not saying that you can't be a good programmer without a degree. I'm saying that the formal education usually makes you a better one.

But it's not the formal education itself that made you a better programmer, it was the directed learning structure that was able to be applied to your previous practical experience as a developer.

If anything it's an anecdote that a formal education is more beneficial after you have practical experience under your belt rather than before (which I agree with whole heartily), but that is not how 99% of the people out there get degrees or approach formal education, and most developers do not even have a real passion for developing outside of getting a good job making good money.

I agree with both of those statements completely.

Education is much more efficient when you have some knowledge on the subject. That makes you more able to apply the abstract knowledge to a practical situation. What I'd like to see is people spend 4-5 years in the real world, interning in their chosen profession, then going to college with some idea of what they're getting into.
 

Apteris

Ars Tribunus Angusticlavius
9,592
Subscriptor
[url=http:/civis/viewtopic.php?p=31579437#p31579437:26vca9ft said:
hanser[/url]":26vca9ft]
[url=http:/civis/viewtopic.php?p=31574815#p31574815:26vca9ft said:
TomXP411[/url]":26vca9ft]Among other things, I went from a software house run by men who were truly experts in their field to another job run by a group who basically turned a garage project into a commercial product. The difference in code quality was astonishing; I spent so much time cleaning up the self-taught guy's code that I never actually completed the project because the investor ran out of money and patience.
Unless you literally couldn't deliver value to potential customers, you did the wrong thing, here. You should have monetized what existed, and refactored as you went. "Stop the world" refactoring is a great way to have perfect architecture and a failed business. Business is littered with the corpses of companies with beautiful architectures.
I agree with the sentiment and find your last sentence plausible, but by any chance do you have any references? I'd love to read about such cases; failing because you're too invested in having a beautiful architecture for your code sounds... I don't know, rare.
 

Mexen

Seniorius Lurkius
23
Hahaha, so true. School taught me how and why to document my code or communicate with team members. Aside from the very basics, I taught myself every language I know. In the real world, I combined my skills with the professional etiquette from my classes.

Edit: I would also like to add that the rigid learning structure from school has stayed with me to this day and it is what makes learning languages today even easier.
 

Denzinger

Ars Centurion
379
Subscriptor++
I think the advantage to self-directed study is that a competent, passionate student can probably exceed what would be taught in a given course. Maybe it's a bad example, but I remember my introductory class in C. Of course we spent a lot of time dealing with pointers, but one topic we didn't cover in the introductory class was pointers to functions. I can't say whether it was a shortcoming of the class itself or unrealistic to include pointers to functions in an introductory class. Someone with the competence and interest could have grabbed a copy of K&R and added that bit of knowledge whether the professor taught it or not.

That said, I think the advantage to a formal course of study is that professions implied by a CS degree generally (IMHO) require more than technical knowledge. Working as part of a team, professional ethics, the importance of documentation and writing self-documenting code, requirements elicitation, design, testing, ongoing professional development, and so on. I think people tend to skip these skills in self-study precisely because they're not technical and therefore irrelevant.

My completely anecdotal experience (and not just in CS, but in many fields) is that self-taught people may have superior technical knowledge, but they don't always make good employees because they lack professionalism. On the other hand degreed people just may not be very good (technically or professionally). Just my two cents.
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
My completely anecdotal experience (and not just in CS, but in many fields) is that self-taught people may have superior technical knowledge, but they don't always make good employees because they lack professionalism. On the other hand degreed people just may not be very good (technically or professionally). Just my two cents.
If that's true, and I'm agnostic on the question, then I'd bet it is more related to selection effects and general undergraduate acculturation, than it is to anything taught in the classroom.
 

fitten

Ars Legatus Legionis
55,636
Subscriptor++
[url=http:/civis/viewtopic.php?p=31604023#p31604023:17r9kwz1 said:
Denzinger[/url]":17r9kwz1]My completely anecdotal experience (and not just in CS, but in many fields) is that self-taught people may have superior technical knowledge, but they don't always make good employees because they lack professionalism. On the other hand degreed people just may not be very good (technically or professionally). Just my two cents.

That's why it's best to have both. I remember when I got out of school and got my first job. There were a bunch of people (long timers) who were extremely threatened by people like me... people who actually loved computers (hardware, software, all of it) and had them at home and spent a great amount of time using them in their off time as well as during work. Many of the old timers saw computers as tools they used at their jobs. Once they left work, they didn't touch a computer until they came back to work the next day (or Monday). My friends and I all had computers at home that we programmed for fun, played games, etc... the computer was our "entertainment center". I had a couple of old timers at work tell me this type stuff directly. A couple of them retired (or moved to other jobs, typically with our customers so they could just support the product until retirement with little 'competition' from the 'new folks') while I was there.
 

Denzinger

Ars Centurion
379
Subscriptor++
[url=http:/civis/viewtopic.php?p=31604053#p31604053:11z668bt said:
Faramir[/url]":11z668bt]
My completely anecdotal experience (and not just in CS, but in many fields) is that self-taught people may have superior technical knowledge, but they don't always make good employees because they lack professionalism. On the other hand degreed people just may not be very good (technically or professionally). Just my two cents.
If that's true, and I'm agnostic on the question, then I'd bet it is more related to selection effects and general undergraduate acculturation, than it is to anything taught in the classroom.

Selection effect is certainly an issue, but when I said "professional," I was thinking of professionalism in terms of predominantly non-technical skills that separate a person who codes from a person who codes in a professional way. I could be completely off base, but when I look around at "how to code" resources, I see a lot of syntax and standard library help. I don't see a lot about developing meaningful tests, writing well-documented code, coding conventions, or all the other things I expect professional developers would know. That stuff is certainly classroom-ready and (at least in my case) was part of the curriculum.

Now basic professional behaviors like "show up on time," "don't leave early," and "dress appropriately for the workplace" are absolutely learned and learnable outside the classroom. Again...it may just be me.
 

KallDrexx

Ars Tribunus Militum
2,040
[url=http:/civis/viewtopic.php?p=31607519#p31607519:3n43x1je said:
Denzinger[/url]":3n43x1je] I don't see a lot about developing meaningful tests, writing well-documented code, coding conventions, or all the other things I expect professional developers would know. That stuff is certainly classroom-ready and (at least in my case) was part of the curriculum.

I don't know anyone with a software engineering degree, but out of all the people I know and have worked with that graduated with computer science degrees (even some who have gone through to a masters) none got any of that from schooling. I personally have had to mentor CS majors on these things years after they graduated.
 

Ardax

Ars Legatus Legionis
19,795
Subscriptor
I'd love to read about such cases; failing because you're too invested in having a beautiful architecture for your code sounds... I don't know, rare.
Netscape 5 would like to have a word.

Granted, it had other problems at the time too, but Netscape wasted a lot of time throwing out the Netscape 4 source code to try to rebuild everything around Gecko. It wasn't the only thing that killed Netscape, but it was a significant factor.
 

CUclimber

Ars Legatus Legionis
19,626
Subscriptor
I don't see a lot about developing meaningful tests, writing well-documented code, coding conventions, or all the other things I expect professional developers would know. That stuff is certainly classroom-ready and (at least in my case) was part of the curriculum.
That's what everyone always seems to be missing. It's relatively easy for someone to learn the conventions in Python and write some simple programs over a weekend. They can probably pick up some of the more advanced OO stuff within a couple of weeks if they really put their mind to it.

But no coding academy or "how to code" course I've ever seen has had any material on how to write a requirements document to work off of, or how to properly structure a medium-sized project, or how to take full advantage of Git, how to automate testing, etc. Actually writing an individual module or function may be straightforward, but designing a whole product is something else entirely.
 

technophile

Ars Legatus Legionis
23,768
[url=http:/civis/viewtopic.php?p=31620103#p31620103:mwwa43kt said:
Ardax[/url]":mwwa43kt]
I'd love to read about such cases; failing because you're too invested in having a beautiful architecture for your code sounds... I don't know, rare.
Netscape 5 would like to have a word.

Granted, it had other problems at the time too, but Netscape wasted a lot of time throwing out the Netscape 4 source code to try to rebuild everything around Gecko. It wasn't the only thing that killed Netscape, but it was a significant factor.
I've been personally involved in two projects that failed this way (early on in my career).

One was a ground-up rewrite of a very popular (with our users) management application. The original was a relatively straightforward Delphi forms application that directly accessed the central database; it had evolved over probably ten years. The replacement was (intended to be) a distributed server model (using DCOM at the time) to allow for scaling and failover as well as centralized caching, security, etc. A year in, they were basically a year behind schedule and millions of dollars over budget because DCOM was massively overcomplicated and they spent so much time trying to essentially develop a DCOM-based microservices architecture (well before microservices were well understood; this was in ~2000) that would be perfectly scalable that they never got around to actually figure out how the product should look or work. I had left the company just before they kicked off the project, and came back as a consultant about a year later for a brief period when they were desperately adding resources to try to get it back on track. As far as I know the project was scrapped shortly after I left the company for good.

The second one was a similar project for a completely different company; the broad outlines are very similar (although this was 2005, so instead of DCOM it was all designed around .NET web services, which were at least simpler and somewhat more mature). The company managed to salvage some of its investment by merging their existing project with the intended replacement project rather than just dropping it, but it still cost them a lot of time and money they didn't really need to spend because they were trying to come up with the "perfect" architecture pretty much without considering how they would get their current product (and their customers) from here to there - and this for a company that made 90% of their gross income from year-over-year license renewals.

For another example, look at how Microsoft wanted to rewrite NTFS as a transactional, queryable database back in the Vista days.

I've also been involved in a number of successful projects to replace existing services or products with brand-new replacements. It can be done, but it means always having a plan for transitioning from old to new, and often that means accepting compromises in the new design. If you're not willing to be mindful of those needs, and make allowances for them, you're typically asking for trouble.
 

fitten

Ars Legatus Legionis
55,636
Subscriptor++
[url=http:/civis/viewtopic.php?p=31638103#p31638103:22if1y3l said:
technophile[/url]":22if1y3l]It was the most amazingly painful development experience of my career. You haven't experienced DLL hell until you've experienced DCOM DLL hell.

Been there, done that. At my first job, I was moved onto a project that rewrote everything as COM/DCOM (this was mid 1990s). I did leave the company before that was released but not because of that project. The project actually was released and evidently worked pretty well. But yeah... during development, a ton of folks were learning C++ and COM/DCOM and it could get pretty nasty some days.
 

jdietz

Ars Praefectus
3,418
Subscriptor
[url=http:/civis/viewtopic.php?p=31509587#p31509587:2q12r0w8 said:
Ronin007[/url]":2q12r0w8]
Here's a basic litmus test for programmer level competence:
- follows/understands programming practices
- knows big O
- can program Huffman encoding
- can read other peoples terrible code

...Most programmers are level 0.
One place I worked at got lots of applications for development positions. Of which, upwards of 90% get rejected because the next stage of the process involves a basic competency test. And I mean basic - applicants who can't define an object, a function/method, inheritance.
The only one I know is defining a function. I don't program for a living. Is there anyone who can program who can't define a function?

What kind of problem needs object-oriented programming to solve?
Being an amateur programmer, I found Python (both versions) to be easy to program in.
I understand how to use built-in object methods and properties, but I don't understand why I'd want to define my own object classes. Inheritance is right out.
 

TomXP411

Ars Tribunus Angusticlavius
9,356
[url=http:/civis/viewtopic.php?p=31765481#p31765481:1fzecrww said:
jdietz[/url]":1fzecrww]The only one I know is defining a function. I don't program for a living. Is there anyone who can program who can't define a function?

I know, right? But I've also seen people who claim to be able to program but who don't seem to have a grasp of the basic mechanics of structured programming.

And honestly, a lot of scripts can be written that never use subroutines of any sort, so I could see someone who learns some basic Python and yet couldn't pass a basic competency test.

What kind of problem needs object-oriented programming to solve?
OOP is about creating data models and allowing developers to combine data and actions into one logical unit. Strictly speaking, no problem "needs" OOP to solve, but nearly all projects that involve more than one piece of data should be using OOP to make it possible to keep the data straight.

Being an amateur programmer, I found Python (both versions) to be easy to program in.

Python is a fine way to get started with algorithms, but there's a huge part of software design that Python, Lua, PHP, and Javascript all ignore. My pet peeve is the lack of strong typing and type safety; a programming language should always have a way to say "this variable may only hold an integer", for example.

I understand how to use built-in object methods and properties, but I don't understand why I'd want to define my own object classes. Inheritance is right out.

Think about something relatively simple, like a web based shopping cart. How do you store all of the properties of a product, such as its price, description, SKU, UPC, and stock on hand? The simple way is to define an object with all of those things as properties:

Code:
class InventoryItem {
    string Description;
    string SKU;
    string UPC;
    decimal Price;
    int OnHand;
}

Now, every place in your code you need to work with an item, you use an InventoryItem variable. Without a composite variable type (structure or class), you'd have to resort to using arrays or packed lists to store all those values.
 

jbode

Ars Legatus Legionis
11,752
Subscriptor
[url=http:/civis/viewtopic.php?p=31765481#p31765481:1pv627jp said:
jdietz[/url]":1pv627jp]

=snip=

The only one I know is defining a function. I don't program for a living. Is there anyone who can program who can't define a function?

You'd be surprised...

What kind of problem needs object-oriented programming to solve?

Nothing needs OOP, but some problems become much easier to work using an OO approach. IME, anything that involves managing a lot of state information (have I been initialized, have I been updated, when was I last updated, is it time to send an alert yet, have I sent an alert, is it time to send an alert again, etc.) really benefits from an OO approach.

It's not a silver bullet, and there are times when it is overkill. If your problem can be cleanly defined in terms of inputs and outputs (a filter like grep, for example), then you really don't need OO.

Being an amateur programmer, I found Python (both versions) to be easy to program in.
I understand how to use built-in object methods and properties, but I don't understand why I'd want to define my own object classes. Inheritance is right out.

Here's an example of iheritence based on some work I'm doing right now.

I'm working on a monitor process that regularly polls a bunch of client instances and reports their status to various systems, including sending email alerts. So I created an abstract StatusListener class (interface) that exposes an update() method. I then realized multiple concrete classes that all implement the StatusListener (one sends emails, one sends updates to xymon, one attempts to restart down instances). At startup, each class registers itself with the poller class. As its running, the poller periodically cycles through the list of registered listeners and calls the update() method for each (IOW, it's an example of the Observer pattern, which gets used a lot in this particular app).

To extend this to send alerts to new systems (such as an internal support ticket generator, which was a requirement but now isn't), I just need to realize a new implementation of the StatusListener.

Code:
class StatusListener {
public:

  virtual ~StatusListener() {}
  virtual void update( Properties& stateOfTheWorld ) = 0;
};

class XymonStatusListener : public StatusListener {
public:

  XymonStatusListener( ... ); // sets up parameters specific to updating xymon
  virtual ~XymonStatusListener( );

  /**
   * Methods specific to communicating with xymon
   */
  ...
  void update( Properties& stateOfTheWorld );
  ...
};

class EmailStatusListener : public StatusListener {
public:

  EmailStatusListener( ... ); // sets up parameters specific to sending email
  virtual ~EmailStatusListener( );

  /**
   * Methods specific to setting up email
   */
  ...
  void update( Properties& stateOfTheWorld );
  ...
};

And then, somewhere in the startup code:

Code:
...
StatusListener *xymonListener = new XymonStatusListener( ... );
StatusListener *emailListener = new EmailStatusListener( ... );
...
poller.addListener( xymonListener );
poller.addListener( emailListener );
...

Then, within the poller itself:
Code:
void Poller::addListener( StatusListener *l )
{
  m_listeners.push_back( l );
}

void Poller::doUpdates( )
{
  for ( std::vector<StatusListener*>::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it )  
  {
    it->update( this->stateOfTheWorld );
  }
}

Of course, because I'm a talentless hack, my code is pretty ugly. And the actual implementation isn't quite so nicely partitioned (there's a lot of leakage between classes, because the act of sending an update changes the state of the client). It's basically a mess.
 

C0rinthian

Ars Tribunus Angusticlavius
6,858
What kind of problem needs object-oriented programming to solve?
Being an amateur programmer, I found Python (both versions) to be easy to program in.
I understand how to use built-in object methods and properties, but I don't understand why I'd want to define my own object classes. Inheritance is right out.

Taking a crack at this last question too:

Imagine you're making a game. In this game, you're going to have enemies that the player fights, and those enemies have attributes and such. Bad pseudocode follows

Code:
enemyHealth = 100
enemyAttack = 5

while enemyHealth > 0:
  playerInput = getPlayerInput()
  if (playerInput == 'attack'):
    enemyHeath = enemyHealth - playerAttack

print "You defeated the enemy!"

Okay, this kinda works. But what if you want more than one enemy? Do you have enemy1_health, enemy1_attack, enemy2_health, enemy2_attack, etc? That's not maintainable. Maybe you get creative and put them in an array of dicts or something, but that's still a pain to parse and ensure you're dealing with the right enemy. So you create a class:

Code:
class Enemy:
  def __init__(self, health, atkPower):
    self.health = health
    self.atkPower = atkPower

enemy1 = Enemy(100, 5)
enemy2 = Enemy(200, 10)

Now I've defined what an enemy is, and can quickly create multiple instances that are independent of each other. This is better. But what if I'm tired of having to enter in the attributes for every enemy I make? Maybe I have a couple ideas for archetypes of enemies. This is where inheritance can come in. Lets define a function applicable for all enemies, and two classes which inherit from that base Enemy class, and extend it.

Code:
class Enemy:
  def __init__(self, health, atkPower):
    self.health = health
    self.atkPower = atkPower

  def isAlive(self):
    return self.health > 0


class SmallEnemy(Enemy):
  def __init__(self):
    Enemy.__init__(self, 100, 5)

class BigEnemy(Enemy):
  def __init__(self):
    Enemy.__init__(self, 200, 10)

  def enrage(self):
    self.atkPower += 10


enemy1 = SmallEnemy()
enemy2 = BigEnemy()

print enemy1.health
# 100
print enemy2.health
# 200

print enemy1.isAlive()
# True
print enemy2.isAlive()
# True

print enemy2.atkPower
# 10
enemy2.enrage()
print enemy2.atkPower
# 20

enemy1.enrage()
# AttributeError: SmallEnemy instance has no attribute 'enrage'

Now I can quickly instantiate two different kinds of enemies, and know they're always consistently defined. If I want to change an enemy type, I only have to change it in one place. I know all Enemy objects have an isAlive() function which will always behave the same way for all Enemy objects regardless of subclass. Additionally, I've extended BigEnemy to have an additional function specific to it that isn't shared with the generic Enemy class.
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
If you genuinely need mutable state (and sometimes you do) then OOP can really help since you can use it to constrain the mutation to at least keep the state of an individual instance consistent.

It also often makes sense to name some class of things which themselves have properties/attributes/things. the trick is that there's no requirement that this be done as 'classes' in OOP. There's many way to skin this - and it pretty much boils down to how you consider Types[1]. Many lanagues that are not 'OOP' in style (or allow it but do not require it) will end up using the same mechanisms under the hood as an OOP based lanague would to implement such things. But it doesn't have to be OOP.

Where things go wrong is when people don't see that they can often do things more easily in terms of *functions*. Interfaces where there is only ever one method on it, and you can't see any need to ever add more... that's just a function, and likely should be treated as such. First class functions solve many of the 'boiler plate' issues OOP centric languages are (rightly) knocked for.

Of course you can mix and match, and I think on balance that's the right thing to do in the real world, but generally you want to design such mixed systems very well in advance so things don't get nasty edge cases or weird behaviour. As an example c#, like many lanaguages has 'void'. void is a right pain in functional languages as it prevents you treating things as expressions, which is often needed to make functional style pleasant. You will get this sort of impedance mismatch when you find you need to have special cases for Func<> verses Action<> for example.

I digress though.

1. And there's a lot to consider - but lets not go there just yet
 
I'm a bit of both. I was actually taught at school (aged 15) how to write a space-invader game in basic on a BBC micro.....

Got the ball rolling anyway.

When I was at university (a long long time ago in a distant planet) I was forced to learn and pass assembly courses....imagine that?!

I hated it, and then when it started to click, I loved it. And I learned so much from being forced to think in the simplest way possible in terms of making a computer do something.

I got to the point of writing linked lists in assembler and thought I was a genius.

Then for about 20 years, never touched assembler again -- until recently...

I'm a fan of the university model - it forces you to do things you would never do as a hack.
 

hyperactive

Ars Centurion
203
Subscriptor
This subject has been on my mind, and I always felt I had a personal bias which clouded the issue. Now I feel "live coding" was the piece missing from my vocabulary until last week.

https://neil.fraser.name/news/2015/06/03/

The self-taught programmers (STPs) displayed the "live coding" style to an alarming degree. It became more apparent in pairing, and explains some difficulties. I would get blank stares when I said let's first write out pseudo code and describe the desired result in plain english. Likewise with, what do we want to test, what are we expecting the code to do. I felt like I was talking to the wall when I would say we start with a theory (or hypothesis), we know what we expect.

More often, the STPs will say "can I try something", and are more interested in making *multiple* changes and refreshing -- easier, quicker, and visual proof. I was repeatedly witnessing Google searches with copying from the question post's sample logic, and several attempts from the different search results. This lead to fixes that were short term, absent of understanding of downstream impact for complex systems, and saddest of all a burden on QA engineers to discover issues or shoulder the blame. You might dismiss this as typical junior engineer experience, but no there are seniors.
 

Apteris

Ars Tribunus Angusticlavius
9,592
Subscriptor
"Live coding" is a useful phrase, thank you for that. (I'd seen Brett Victor's demo already, but wasn't aware of this phrase.)

Since we're talking about it, let me quote from the post you linked to:

[url=https://neil.fraser.name/news/2015/06/03/:28ys2o6e said:
Neil Fraser[/url]":28ys2o6e]Bret Victor gave an inspiring demo back in 2012 that showed the benefits of what became known as "live coding". The idea is that instead of writing code, running it, then looking at the output, one should instead have the program continuously running as one types code. By tightening the development cycle to zero, programming can become more creative and allows for more experimentation.

The educational community has seized on this concept and learning tools are increasingly using live coding. Bret has since posted that this a misapplication of his ideas, but this message failed to gain the same traction as his earlier video.

Now, finally, people are starting to take a more critical look (e.g. An Empirical Study of Iterative Improvement in Programming Assignments) and are finding that rapid feedback actually hurts learning and slows down programming. So what's going on here? Why does making programming easier make it harder?
I'd argue that faster feedback is always good, even if it has negative externalities, such as making people think less up-front. And some times you just want to fix the damn CSS or JS.

Of course, if you do that too much or end up copying code without understanding it it's :scared:.
 

hanser

Ars Legatus Legionis
43,853
Subscriptor++
I think too much in-the-moment feedback can keep a person focused on superficial stuff like variable and method names rather than overall design. Programming is discovery, especially for a beginner. You don't want to stifle those opportunities. Rarely do you write a first draft and have it be what's really required. So you iterate.

By derping the simple stuff, you'll not learn the big stuff because it inhibits flow.
 

technophile

Ars Legatus Legionis
23,768
I liken it to the live grammar and spelling correction in Word. You're writing, you have an idea of where you're going, you're thinking about the big picture, and then WHAM there's a red squiggly line in your face and you spend ten or thirty or ninety seconds deciding, is that word spelled correctly and Word is wrong, is that the word I really want there anyway, let's play with the dictionary for a bit, what if I used another font... and then you've lost your way. I've seen my own son do it, to the point where I am seriously considering either making him write in Notepad or at least turning off the spell/grammar checking (I can do that myself after the fact).
 
Status
Not open for further replies.