Why did I write bad code?

I guess we have to all learn.

  • (2 Pages)
  • +
  • 1
  • 2

25 Replies - 2623 Views - Last Post: 15 January 2010 - 10:44 AM

#1 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Why did I write bad code?

Posted 01 January 2010 - 10:31 PM

I just found a link to one of my old blogs that I actually only wrote about 4 months ago on Creating models in ASP.net and using them correctly, and I lol'd and criticized my own work. All I could think of as I was spead reading an old post was why did I choose that data type? I should have choosen this data type. Why did I not separate these as 2 separate projects and reference them? Why did I not use generics, or a design a factory or singleton pattern for this model, and I have realized something.

I believe I'm actually getting what it takes to be a good "damn good" coder that separates you from the every day coder. Learn constantly learn everyday and master your own craftsman. Programming it's not an occupation or hobby it's a craft that one has to truly be determined to master.

This post has been edited by coden4fun: 01 January 2010 - 10:33 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Why did I write bad code?

#2 SwiftStriker00  Icon User is offline

  • No idea why my code works
  • member icon

Reputation: 433
  • View blog
  • Posts: 1,599
  • Joined: 25-December 08

Re: Why did I write bad code?

Posted 01 January 2010 - 10:45 PM

Well have a fun game with yourself, make a new post updating and correcting yourself. Then in 4 months do it again. The real question will be the day you can't make it better, is it because you have reached your skill limit or the languages limit? :P

btw, I've gone back and cringed at what I've wrote before too, I ended up scrapping a whole project and re-writing it, was ashamed of my old self :P
Was This Post Helpful? 0
  • +
  • -

#3 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Re: Why did I write bad code?

Posted 01 January 2010 - 10:50 PM

Yea, I know what you mean. I'm at the point where I know the fundamentals, advance topics, what I don't know I use my msdn documentation and quickly learn to apply it, and I try to use the best design patterns that wil optimize code longivity, make it extensible for future use.

It's like one day I just opened up a door that said .Net that also read "be weary the weak", and I decided to just run in at full speed, and now I'm kinda want to slow down and take a good look at this big massive place.

I mean I know ASP.net, C++, C#, and I stay clear of VB.Net to be honest, but I can see VB.Net code and rewrite it for C#. I also know how to work with their databases, but I want to master it all, and I'm afraid it will take patience and time to do so.

This post has been edited by coden4fun: 01 January 2010 - 10:52 PM

Was This Post Helpful? 0
  • +
  • -

#4 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Why did I write bad code?

Posted 02 January 2010 - 10:48 AM

You should see some of the C code I did about a year ago. It's disgusting :P
Was This Post Helpful? 0
  • +
  • -

#5 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,047
  • Joined: 15-July 08

Re: Why did I write bad code?

Posted 02 January 2010 - 10:50 AM

View Posterik.price, on 2 Jan, 2010 - 11:48 AM, said:

You should see some of the C code I did about a year ago. It's disgusting :P


You should STILL see my C code :P
Was This Post Helpful? 0
  • +
  • -

#6 Theaegd  Icon User is offline

  • Hater & Lover

Reputation: -125
  • View blog
  • Posts: 944
  • Joined: 15-August 09

Re: Why did I write bad code?

Posted 02 January 2010 - 11:33 AM

a year ago I was still with......... ugh....... VB.NET!!!! NO!!!!!!


yeah
Was This Post Helpful? 0
  • +
  • -

#7 Choscura  Icon User is offline

  • D.I.C Lover


Reputation: 466
  • View blog
  • Posts: 2,227
  • Joined: 18-October 08

Re: Why did I write bad code?

Posted 02 January 2010 - 12:00 PM

About a month ago I cracked open an old hard drive and found some code from when I was first playing with C#. opened up one project, got it working in two minutes. opened the next one, five minutes. and so on- a continuous stream of stupid mistakes that I should have been able to figure out.

Embarassing. At least I know better now.
Was This Post Helpful? 0
  • +
  • -

#8 Theaegd  Icon User is offline

  • Hater & Lover

Reputation: -125
  • View blog
  • Posts: 944
  • Joined: 15-August 09

Re: Why did I write bad code?

Posted 02 January 2010 - 01:49 PM

I know what you mean, 1 month from now you will look back to today, and be like " wow I was a total idiot back then..." and then the month after that, and so on for the rest of your ENTIRE LIFE!!!!!!!!


yeah
Was This Post Helpful? 0
  • +
  • -

#9 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Re: Why did I write bad code?

Posted 02 January 2010 - 01:53 PM

@Theaegd, I would use the term ignorant of what I was doing at the time, and not idiot.

Idiots are people who can't spell their name correctly.

This post has been edited by coden4fun: 02 January 2010 - 06:31 PM

Was This Post Helpful? 0
  • +
  • -

#10 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Why did I write bad code?

Posted 02 January 2010 - 01:59 PM

Or spell idiot correctly, or use their instead of there.

(sorry, coden4fun, had to poke fun at that. ;))

I've had the moments of What the hell was I thinking? I could have used this, this, this and this, to make it shorter and way more efficient. I had a lot of them looking back on my first Java course's code.

This post has been edited by Locke: 02 January 2010 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

#11 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Re: Why did I write bad code?

Posted 02 January 2010 - 06:33 PM

@Locke, You got me. I can't believe that I actually misused there instead of their. GD, I'm an idiot at times. I blame it on the long hours of I put myself in coding lately.

I even wrote a blog in the Caffeine Lounge on the Top 10 words commonly misspelled.... Ha, I'm laughing at myself.
Was This Post Helpful? 0
  • +
  • -

#12 Theaegd  Icon User is offline

  • Hater & Lover

Reputation: -125
  • View blog
  • Posts: 944
  • Joined: 15-August 09

Re: Why did I write bad code?

Posted 03 January 2010 - 01:48 PM

when I said idiot I didnt mean a literal idiot, just an expression
Was This Post Helpful? 0
  • +
  • -

#13 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1377
  • View blog
  • Posts: 3,502
  • Joined: 28-November 09

Re: Why did I write bad code?

Posted 03 January 2010 - 04:47 PM

It works the same in Graphics, 3-4 years ago I was something awful....

Hey Locke how do you get the code/quote box without the header?
Was This Post Helpful? 0
  • +
  • -

#14 coden4fun  Icon User is offline

  • if(coden4fun.NotTired){ ContinueToCode(); }
  • member icon

Reputation: 27
  • View blog
  • Posts: 696
  • Joined: 27-February 09

Re: Why did I write bad code?

Posted 03 January 2010 - 05:05 PM

View PostLocke, on 2 Jan, 2010 - 12:59 PM, said:

Or spell idiot correctly, or use their instead of there.

(sorry, coden4fun, had to poke fun at that. ;))

I've had the moments of What the hell was I thinking? I could have used this, this, this and this, to make it shorter and way more efficient. I had a lot of them looking back on my first Java course's code.


Looking at his quotes seems like the way to do it

is the following


[il]text that you would want to put in[/il]



This post has been edited by coden4fun: 03 January 2010 - 05:07 PM

Was This Post Helpful? 0
  • +
  • -

#15 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Why did I write bad code?

Posted 03 January 2010 - 05:18 PM

As a programmer you are constantly evolving. As you work on more and more projects you come across many new ideas and different ways of looking at things. If I could find code that I wrote in university (late 80s, early 90s) I would be totally embarassed by it. Even comparing code that I wrote a year ago to what I'm writing now I get those types of feelings: "WTF was I thinking!"

Now with the Internet and being exposed to so much new ideas, libraries and languages and even better computes what might have been considered impossible when I started out is not only probable but it has been done.

I remember when a computer with 8MB and a 1MB graphics card, 2GB HD was top of the line. As technology continues to evolve out jobs will evolve.

If we don't learn to adapt we will be assimilated. (Sorry couldn't resist.)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2