Programming from scratch

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 3847 Views - Last Post: 29 May 2014 - 05:48 AM

#1 AfterBurner66  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 116
  • Joined: 02-August 08

Programming from scratch

Posted 12 July 2011 - 04:21 PM

Hello all!
As I read recently in dreamincode's newsletter and as we all know, there are - unfortunately - many "programmers" and "developers" - the double quotes are not enough in my opinion, much more needed - who copy - paste code to do their job. I ABSOLUTELY agree that such wrong philosophies, cannot be supported by a serious and succesful forum, such as dreamincode. And by the way, I want to share my opinion here and of course to hear others. How can someone be called "programmer" or "developer" if he/she does not know what is doing, and why is done this way. Personally, some years ago, I began programming with Pascal, a good "teacher" in my opinion. This helped me a lot. I was writing algorithms in a pseudo - like-Pascal - language and implement them in Pascal. So , I began coding from scratch in a dos-like environment (Turbo Pascal), as part of a web development course, I was attending. Then I learned some client-side (Javascript) coding along with HTML and XML. I used Windows Notepad for all the coding - nothing more. The same I did for PHP and Java. I started to learn C by my own, using again only Notepad and gcc toolchain and I was trying to do everything from scratch, till I grasped the basics and then I started to use some more advanced tools. After all these, I attended a technical course for application programming (C - C++ - Java - MySQL), and I was way ahead in programming. This was due to learning programming from scratch and not that I am a genious. Now, I use many editors, compilers, IDEs and tools, but best of all is that I can easily learn to use new tools in a snap. But even better, is that I learned the algorithmic way of thinking, so when I want to tackle any software related problem, I follow some steps to describe the solution and then I choose, according to requirements and available resources, the languages and tools that fit the puzzle. Of course, there are times, which all of us take a look in a code snippet, or copy some lines of code to modify them later to our needs, but that's enough I think. Or think it another way: how compact and safe would be a building, if its chief architect had copy - paste its building blocks from here and there on his paper, in the hope that using many modifications, this would finally work in practice? The same holds true for software development. The only real way to master programming and software development, is to start from scratch and do it the "hard" way. There is no "soft" way - never was, for anything in this life, that can do someone proficient. The "soft" way is messy, sloppy code without documentation and of course this cannot make someone a real developer in any way. But I also agree to the opinion, that this hurts software industry too. How someone is ambitious to build a career, using scrambled knowledge
and is expecting to offer rigid solutions? And why he/she can have a place in software industry? This is unfair and makes no sense. Learn what, how and why, is the clue.

This post has been edited by AfterBurner66: 12 July 2011 - 04:38 PM


Is This A Good Question/Topic? 1
  • +

Replies To: Programming from scratch

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: Programming from scratch

Posted 12 July 2011 - 05:01 PM

Quote

I started to learn C by my own, using again only Notepad and gcc toolchain and I was trying to do everything from scratch, till I grasped the basics and then I started to use some more advanced IDEs.


That is exactly the way it should be, unfortunately, beginners usually give command line programming a miss in favor of IDE's. Of course, IDE's are very useful but compiling (etc) on the command line is an essential skill which can easily be overlooked.
Was This Post Helpful? 0
  • +
  • -

#3 salindor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 46
  • View blog
  • Posts: 301
  • Joined: 10-November 06

Re: Programming from scratch

Posted 12 July 2011 - 05:27 PM

To be quite honest I was upset he lumped "copy-paste" coder with the copiers(they don't deserve to have coder as they didn't code anything).

I have always thought of a copy-paste coder as someone who can look at a set of code and adapt it quickly by copying from the first location then pasting and using a set of macros and search and replace to get the code near where it needs to be with some final fine tweaking.

Don't get me wrong I know how to develop my own algorithms, I have even invented a couple and used it in my thesis to get my masters. However, knowing how to reuse code is still an important skill that shouldn't be overlooked.

But I guess really I shouldn't get too upset because the heart of the article was about those who just copy from the forums without trying to understand and they needed a term to label them. Still I wish they didn't use that one...
Was This Post Helpful? 0
  • +
  • -

#4 code_m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 202
  • Joined: 21-April 09

Re: Programming from scratch

Posted 12 July 2011 - 05:36 PM

Rant all you want good sir. It's good methodology to try something yourself before looking for already done solutions. Just remember why you yourself share your code and/or ideas with others.
Was This Post Helpful? 0
  • +
  • -

#5 scs12psu  Icon User is offline

  • New D.I.C Head

Reputation: 12
  • View blog
  • Posts: 6
  • Joined: 18-April 09

Re: Programming from scratch

Posted 12 July 2011 - 05:43 PM

I've only ever logged in once to this site, and that was to flame (do people still use this term?) some people for giving away answers to my introductory programming students. Congratulations on the recent editorial! PLEASE stick to this philosophy when "helping" a student! I have a staff of 5 people + there are tutors available from the University -- all for free and available to my students. Most of the posts of my assignments that I have seen here simpy reply with the answer. We're talking about simple loops and conditionals -- if students won't spend a little time learning how to do the basics, then they should not be in a programming class! We /certainly/ don't want them running around selling themselves as professional programmers.

Again, I applaud the editorial -- this is what caused me to log in and post here tonight.

Hooray for the true professionals!
Was This Post Helpful? 1
  • +
  • -

#6 salindor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 46
  • View blog
  • Posts: 301
  • Joined: 10-November 06

Re: Programming from scratch

Posted 12 July 2011 - 06:10 PM

code_m I wasn't referring to simple algorithms of 100 lines of code... I was referring to 20k + lines of code or even copying your own code.

Or algorithms which require enourmous math skills (like finding all the complex roots of a polynomial with complex coeffecients and multiple roots). I went through 6 different algorithms trying to find one (and the newton rhapson method is known to blow up on multiple roots, the Laguerre's method blew up on me at degree 6, I didn't understand muller's method, I can't remember the original alogorithm I found but it blew up on multiple roots). The final algorithm I found and adapted was invented in the 70s and while there are many aspects of it I don't understand I was able to understand it enough to be able to reuse it.

Yes I reused that code (but I also gave credit), it took a solid 2 months to find it, analyze it, let alone port it (reminded me just how much I hate fortran) and test it. If I tried todo the same thing from scratch I would still be scratching away at the white board doing more research on it and most likely wouldn't arrive (the subject is apparently very complicated much more so than I realized in the beginning). What is even funny about it; is this isn't even the focus of the application I am writting, I just happen to need it for that application.
Was This Post Helpful? 0
  • +
  • -

#7 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: Programming from scratch

Posted 12 July 2011 - 06:33 PM

Wow this completely goes against what my professor told me. If someone has already done it, why create new code? Don't work hard, work smart. I do not agree 100% on my professor but what I believe in is if you really don't know how to create something, look up some codes, try using them, see how they work, and when you understand them code them from the ground up, glancing on the code of others when something is not right. Eventually you'll pick it up and then that particular problem becomes easy for you to solve on your own. The wrong thing is when students copy+paste code without learning what really goes on inside. Just to reach a deadline they don't care what codes they put as long as it works. Some say they'll study it when they finish the thing but some programs grow huge and if it daunts them with all the lines of code so they just give up. In my class I believe 25% or less understands programming while the others survived because of copy+pasting.

I also agree that people should know how to compile/code without IDEs. What if you're applying for a job and they don't have an IDE setup? You'll look stupid. And there are times when your IDE gives up on you, then you stop working. It really pays to know the basics. You could just open up your code in notepad and rely on the tried and tested debug compile with cmd.

Plus people rely too much on intellisense.
Was This Post Helpful? 0
  • +
  • -

#8 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2045
  • View blog
  • Posts: 4,233
  • Joined: 11-December 07

Re: Programming from scratch

Posted 12 July 2011 - 07:27 PM

Gee, I hope your methods are shorter than your paragraphs!
Was This Post Helpful? 4
  • +
  • -

#9 stackoverflow  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 165
  • View blog
  • Posts: 545
  • Joined: 06-July 11

Re: Programming from scratch

Posted 12 July 2011 - 08:46 PM

I think there's a big difference between using pre-made code and copying some code and pasting it in your project.

Generally when you /use/ pre-existing code it comes in a package or library. You then read some documentation and of you go-- can safely call methods and use the code without changing a single thing. In fact you are not suppose to change anything-- hence why we practice information hiding, encapsulation etc.

Pre-made code has an interface the user (programmer) follows.

If you run around willy-nilly copying and pasting code you are going to break something.

This post has been edited by stackoverflow: 12 July 2011 - 08:48 PM

Was This Post Helpful? 0
  • +
  • -

#10 DivideByZero  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 238
  • View blog
  • Posts: 551
  • Joined: 02-December 10

Re: Programming from scratch

Posted 13 July 2011 - 04:24 AM

Some people need to start off easy in order to get a passion to go under the hood.

I started with the luxury of Visual Studio and dragging and dropping in Win Forms.
Doing this instead of fiddly command screen compiling sparked a passion for what I was doing as I enjoyed it and it was also relatively easy, so much so that a year later I'm now choosing to use notepad and a command prompt for my programs :)

If you start off with the bare minimum, people will freak out and give up.
I know damn well I would have given up if I started as low level as the OP did.
Starting high helped build a foundation for me to learn enough to then be comfortable enough to go that step down.

And in regards to the copying code part, I completely agree with the OP.
I see students all the time copying code and masking it as theirs, but I get the satisfaction of enjoying what I do and them hating it enough to not try.
So if they do get a job in the industry, they will hate it :)
Was This Post Helpful? 0
  • +
  • -

#11 salindor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 46
  • View blog
  • Posts: 301
  • Joined: 10-November 06

Re: Programming from scratch

Posted 13 July 2011 - 04:57 AM

You have been lucky stackoverflow. I have only found that to be true 40% of the time especially with using code which was around 5-20k lines of code. It generally is enough code that is useful but not enough for it todo what I actually need it todo.

Regardless, if you take code from someone you better give them credit. So please don't get my opinion wrong, 'coders' who copy and don't give credit are guilty of plagiarism at the minimum and possibly copyright infringment depending on the license of the original code.

I don't know why anyone would choose to use notepad over an IDE but hey more power to you :bigsmile:. Saying you have to program in notepad is like saying you have to build a house with only a hammer and a hand saw. We have power tools now days, so it is more effecient just to learn how to use the power tools from the start when building a house.

Salindor
Was This Post Helpful? 0
  • +
  • -

#12 code_m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 202
  • Joined: 21-April 09

Re: Programming from scratch

Posted 13 July 2011 - 07:10 AM

View Postsalindor, on 12 July 2011 - 09:10 PM, said:

code_m I wasn't referring to simple algorithms of 100 lines of code... I was referring to 20k + lines of code or even copying your own code.


I was replying to the original post...
Was This Post Helpful? 0
  • +
  • -

#13 AfterBurner66  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 116
  • Joined: 02-August 08

Re: Programming from scratch

Posted 13 July 2011 - 07:20 AM

Thanks for all the answers guys. Maybe I was not specific enough in some ways, but you know this is a huge topic. What I mean by "copy - paste" coder here - and yes, "coder" here is a redundant word - is to have some, usually obscure, knowledge of programming and developing in general and trying to construct something with code from here and there. It is definitely true that code reuse, in every shape that this has taken all over the years of programming, has made software what it is today. It's no good, from any perspective, to "reinvent the wheel", as this is time and energy consuming and the results, if we talk about a really big project, are not guaranteed. So, we have to reuse code, if we talk about libraries or classes, but this is a whole different story. This is what follows in a physical manner, after mastering the basics from scratch. But in this case you do not copy - paste code.You are using some premade code into your project, and you can analyze that code and you know also, how and why it fits there. But how someone can get to this point if he is not willing to learn how to analyze algorithms and code from scratch? So, it is self evident, that code reuse in this way is perfectly legal and good. As for copy - pasting code from others, yes, there are cases that you must get some idea, no one knows everything, programming is an inspired and creative process by itself, so we all look at some code some times, but in my opinion what matters here, is that you must take an idea, and develop this yourself for your own specific needs. Again, to reach this point you have to master the basics from scratch. If not, then the most you can achieve is to combine some code snippets in an obscure way and when the whole project blows off, you will have no idea where to start debugging. So, yes code reuse, but in a controlled manner. I have come across posts in many forums that people who are think themselves smart, post questions about how to debug code that they copy - pasted without knowing what, why and how. So, can these people be called coders? And is of any use to give them ready to consume code? I think that if someone does not like programming, he must not mess with programming or software.Not everyone can do anything. And for those they want, they have a ver steep learning curve to climb.As I said in my original post, life has specific rules that no one can overcome in a "smart" or "soft" way. So, the time and energy of our lives, that I and many many other people have spent for learning developing from scratch and go professionally from there, never can be a waste of time. It will always pay back.
Was This Post Helpful? 0
  • +
  • -

#14 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2045
  • View blog
  • Posts: 4,233
  • Joined: 11-December 07

Re: Programming from scratch

Posted 13 July 2011 - 07:43 AM

Refactored:

View PostAfterBurner66, on 13 July 2011 - 03:20 PM, said:

Thanks for all the answers guys. Maybe I was not specific enough in some ways, but you know this is a huge topic. What I mean by "copy - paste" coder here - and yes, "coder" here is a redundant word - is to have some, usually obscure, knowledge of programming and developing in general and trying to construct something with code from here and there.

It is definitely true that code reuse, in every shape that this has taken all over the years of programming, has made software what it is today. It's no good, from any perspective, to "reinvent the wheel", as this is time and energy consuming and the results, if we talk about a really big project, are not guaranteed. So, we have to reuse code, if we talk about libraries or classes, but this is a whole different story. This is what follows in a physical manner, after mastering the basics from scratch.

But in this case you do not copy - paste code.You are using some premade code into your project, and you can analyze that code and you know also, how and why it fits there. But how someone can get to this point if he is not willing to learn how to analyze algorithms and code from scratch? So, it is self evident, that code reuse in this way is perfectly legal and good. As for copy - pasting code from others, yes, there are cases that you must get some idea, no one knows everything, programming is an inspired and creative process by itself, so we all look at some code some times, but in my opinion what matters here, is that you must take an idea, and develop this yourself for your own specific needs.

Again, to reach this point you have to master the basics from scratch. If not, then the most you can achieve is to combine some code snippets in an obscure way and when the whole project blows off, you will have no idea where to start debugging. So, yes code reuse, but in a controlled manner. I have come across posts in many forums that people who are think themselves smart, post questions about how to debug code that they copy - pasted without knowing what, why and how. So, can these people be called coders? And is of any use to give them ready to consume code?

I think that if someone does not like programming, he must not mess with programming or software.Not everyone can do anything. And for those they want, they have a ver steep learning curve to climb.As I said in my original post, life has specific rules that no one can overcome in a "smart" or "soft" way. So, the time and energy of our lives, that I and many many other people have spent for learning developing from scratch and go professionally from there, never can be a waste of time. It will always pay back.

Was This Post Helpful? 4
  • +
  • -

#15 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2045
  • View blog
  • Posts: 4,233
  • Joined: 11-December 07

Re: Programming from scratch

Posted 13 July 2011 - 07:48 AM

I don't think there is anyone here who disagrees with you. I'm curious though. What inspired you to suddenly write so passionately about it?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2