14 Replies - 3636 Views - Last Post: 18 July 2012 - 01:03 PM

#1 BrendanH  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 174
  • Joined: 05-May 12

Programming Practice

Posted 05 July 2012 - 01:17 PM

Hello

Not sure if im posting this topic in the right place or not.
Anyway i have a question, im still learning Java but have had very little experience with the actual progamming as most of the stuff is just in text form in books.

Given the circumstances how would i go abouts starting practicing programming while im still studying? so once ive completed my exam and get a job i wont be totaly incompetent when im asked to write a simple program in an interview.

Any help to point me in the right direction would be great!

Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: Programming Practice

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10372
  • View blog
  • Posts: 38,411
  • Joined: 27-December 08

Re: Programming Practice

Posted 05 July 2012 - 01:18 PM

The obvious answer is to actual practice programming by writing programs.
Was This Post Helpful? 1
  • +
  • -

#3 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

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

Re: Programming Practice

Posted 05 July 2012 - 01:20 PM

Start making your way through Martyr2's Mega Project Ideas List. Trying to make the projects there will definitely sharpen your skills as a programmer.
Was This Post Helpful? 2
  • +
  • -

#4 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • Joined: 30-January 11

Re: Programming Practice

Posted 05 July 2012 - 01:24 PM

Also I would say don't go for loads of really small programs. Try and find something that you can continually expand on - adding new features etc - working on a large project will get you more valuable experience than working on 5 Tic Tac Toe programs.

That being said, don't go over your ability. I may say try making something big, but don't take that to mean the next Photoshop or a fully fledged 3D game. Think about your current knowledge and try a project that you believe you can make a good start on. As you get better, come back and improve and add new features.

Good luck.
Was This Post Helpful? 1
  • +
  • -

#5 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5436
  • View blog
  • Posts: 11,652
  • Joined: 02-June 10

Re: Programming Practice

Posted 05 July 2012 - 01:34 PM

View PostBrendanH, on 05 July 2012 - 02:17 PM, said:

so once ive completed my exam and get a job i wont be totaly incompetent when im asked to write a simple program in an interview.


You will be. Accept it now. Not because of you, but because of what university courses teach. Or more correctly, what they don't teach. They teach little to no debugging. They teach next to nothing regarding actual design. They teach tons of habits that are actually considered 'bad' in the real-world of programming.

As for practicing by designing/building/writing programs WHILE you are still learning... How do you think you could do that? If you haven't learned how to architect a program yet, then how are you going to practice it? That's like saying "I'm in my 3rd week of architecture. I'm going to build a house while I learn to design a house." then merrily go of cutting wood and hammering boards together without a plan because you are still learning how to *make* the plan. You don't learn to drive by entering the Indy500 then ask "How do I shift gears?" Or saying "I'm going to learn music by writing an opera"

For now just learn, don't try to design anything from scratch. If the university course is too slow for you, then pick up 5 "Learn {coding language here} in 30 days" books and work them all cover-to-cover. Do the Arrays chapter in every one. Then do the events chapter in every one. Then do the classes chapter in every one. Learn everything you can on one topic at a time then move one when you really know it. Don't skip ahead just because one chapter is tough: That WILL come back to bite you.
Was This Post Helpful? 1
  • +
  • -

#6 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,687
  • Joined: 19-March 11

Re: Programming Practice

Posted 05 July 2012 - 02:00 PM

Quote

As for practicing by designing/building/writing programs WHILE you are still learning... How do you think you could do that? If you haven't learned how to architect a program yet, then how are you going to practice it? That's like saying "I'm in my 3rd week of architecture. I'm going to build a house while I learn to design a house." then merrily go of cutting wood and hammering boards together without a plan because you are still learning how to *make* the plan. You don't learn to drive by entering the Indy500 then ask "How do I shift gears?" Or saying "I'm going to learn music by writing an opera"



The nice thing about diving in and screwing up some big problem in software is the materials cost is zero, so you if you're good at learning from your mistakes you can come out well ahead. Go ahead, make a mess. It's easy to clean up. The main thing is to know when to give up. Don't keep trying to make it work for years, just run it out until you know you're in trouble, then try to figure out how the trouble started.

They teach next to nothing regarding actual design.


Depends on the school. Funny thing is, I run into a lot of self-taught would-be gurus who think design is a silly academic exercise that effete eggheads indulge in because they're chicken to just jump in and start banging away at it.

Quote

They teach tons of habits that are actually considered 'bad' in the real-world of programming.


You know, I'm not sure this is a bad thing. There are certainly many bad habits that are standard practice in the business world.
Was This Post Helpful? 1
  • +
  • -

#7 BrendanH  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 174
  • Joined: 05-May 12

Re: Programming Practice

Posted 06 July 2012 - 10:41 AM

Thank alot for all the advice, i think after reading the comments on this the best way to go ahead will to start on programs that im able to do with the knowledge i have about java at the moment and as i learn more ill just just change the programs around and make the bigger and better.
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6036
  • View blog
  • Posts: 23,421
  • Joined: 23-August 08

Re: Programming Practice

Posted 06 July 2012 - 10:50 AM

In addition to the above, read a lot of different books outside of your textbooks. Read about object-oriented design. Read about SQL database design and integration. Read about best practices. Read about network and web technologies and protocols like HTTP and SMTP and TCP/IP sockets. Find a well-known open source project, download the source code and try to get a feel for how everything fits together.

In short, read!
Was This Post Helpful? 1
  • +
  • -

#9 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3460
  • View blog
  • Posts: 10,668
  • Joined: 05-May 12

Re: Programming Practice

Posted 07 July 2012 - 02:10 PM

View PostJackOfAllTrades, on 06 July 2012 - 10:50 AM, said:

Find a well-known open source project, download the source code and try to get a feel for how everything fits together.

In short, read!

Beautiful Code is an excellent book and it tackles some open source projects and you get to practically sit in the designers/authors mind as they explain the hows and whys they made their design decisions: http://www.amazon.co...e/dp/0596510047
Was This Post Helpful? 0
  • +
  • -

#10 peace_fixation  Icon User is offline

  • D.I.C Head

Reputation: 44
  • View blog
  • Posts: 190
  • Joined: 01-November 11

Re: Programming Practice

Posted 07 July 2012 - 07:43 PM

Project Euler is great, they have some 300+ problems you can solve and they are generally quite small but they will test you!

www.projecteuler.net
Was This Post Helpful? 0
  • +
  • -

#11 carnivroar  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 382
  • Joined: 18-September 11

Re: Programming Practice

Posted 07 July 2012 - 08:09 PM

View Postpeace_fixation, on 07 July 2012 - 07:43 PM, said:

Project Euler is great, they have some 300+ problems you can solve and they are generally quite small but they will test you!

www.projecteuler.net


I was just about to post this.

Yes, PE is fantastic.

I used it to learn C++ and now I'm using it to learn x86. Fortran is next.

It's great for beginners because they are straightforward problems and you can input your answer to see if you got it right. Then you can view other people's solutions and compare them to yours. :gun_bandana:
Was This Post Helpful? 1
  • +
  • -

#12 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3460
  • View blog
  • Posts: 10,668
  • Joined: 05-May 12

Re: Programming Practice

Posted 07 July 2012 - 08:20 PM

View Postpeace_fixation, on 07 July 2012 - 07:43 PM, said:

Project Euler is great, they have some 300+ problems you can solve and they are generally quite small but they will test you!

www.projecteuler.net


The problems are interesting if you have a bend towards mathematics and there's been a couple of posts here that say every computer scientist should have a decent foundation in math.

I feel, though, that the problems presented there are more geared towards computer science/math and code optimizations, rather than software engineering of large systems. So if you want to learn how to write tight efficient code, this will be your cup of tea, and you'll be very happy with it. But if you want to learn how to write modular and maintainable code, look elsewhere because the code you end up writing for the project is very tightly focused on the problem at hand. Yes, you can write it in a more modular and maintainable manner, but if you have a competitive streak and want your program to run as fast as other people's posted times, finding a more efficient algorithm, or taking advantage of a mathematical trick will get you 80% there, but the other 20% is spent unrolling loops, putting in heuristics and special cases, etc.

Yes, it will keep you sharp, but I feel that it'll keep you sharp at the top fuel dragster engine level, but not at the commuter car design level.
Was This Post Helpful? 1
  • +
  • -

#13 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,687
  • Joined: 19-March 11

Re: Programming Practice

Posted 07 July 2012 - 08:34 PM

View PostSkydiver, on 07 July 2012 - 10:20 PM, said:

I feel, though, that the problems presented there are more geared towards computer science/math and code optimizations, rather than software engineering of large systems. So if you want to learn how to write tight efficient code, this will be your cup of tea, and you'll be very happy with it.


I agree that Euler is not a great place to go if you want to understand system building. However, I have to disagree about the optimizations. Euler doesn't care about your optimizations, and it takes a very smart sort of idiot to worry about the running time of this sort of problem instead of the beauty of the solution. There are those sorts of idiots out there, granted, but there's no reason to join them.
Was This Post Helpful? 1
  • +
  • -

#14 AVReidy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 65
  • View blog
  • Posts: 431
  • Joined: 17-February 11

Re: Programming Practice

Posted 10 July 2012 - 06:15 PM

As others have said, the best way to learn is by programming. Most books are pretty much useless; you can get all the reference material you need on the Internet.

But with that said, sitting through hours of tutorials on YouTube will not help unless you're using them as references for building your own application. In my junior year of highschool I got a classmate of mine interested in programming. He's sort of a gamer geek / math wiz. But he approaches programming and learning incorrectly. He once asked me how I learned to program, and I responded with a sincere explanation with the general idea that "you learn by doing." I also told him about TheNewBoston's YouTube channel, and he came to me the next day and said, "...yeah man, I got through like 25 Java tutorials last night." I'm sure he watched them, but that doesn't mean he could put together a program by knowledge that utilizes everything covered from tutorial 1-25. In fact, about 5 months later (quite recently), I was coding (python) in our first period, and he was looking over my shoulder. When I wrote something like "i = i + 1" to increment a variable (I still don't know the increment operator in Python), he said, "You can't do that; it's impossible." Yeah, maybe if you're in math class. But assigning a variable a value is one of the most elementary (but obviously useful) tasks in programming, and despite his ostensible "practice," he didn't get this.
Was This Post Helpful? 0
  • +
  • -

#15 carnivroar  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 382
  • Joined: 18-September 11

Re: Programming Practice

Posted 18 July 2012 - 01:03 PM

View Postjon.kiparsky, on 07 July 2012 - 08:34 PM, said:

View PostSkydiver, on 07 July 2012 - 10:20 PM, said:

I feel, though, that the problems presented there are more geared towards computer science/math and code optimizations, rather than software engineering of large systems. So if you want to learn how to write tight efficient code, this will be your cup of tea, and you'll be very happy with it.


I agree that Euler is not a great place to go if you want to understand system building. However, I have to disagree about the optimizations. Euler doesn't care about your optimizations, and it takes a very smart sort of idiot to worry about the running time of this sort of problem instead of the beauty of the solution. There are those sorts of idiots out there, granted, but there's no reason to join them.


Well OP said that he didn't want to be "totaly incompetent when im asked to write a simple program in an interview." That's why I recommend Project Euler. I would imagine that those are the sorts of problems asked to solve in interviews - but I don't know, I never had an interview before. Which reminds me that I need to get this book!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1