# My summer and programming



## StachuK1992 (Jun 5, 2009)

Hello all,

I have been in Computer Math I-III throughout the past three years, and have taken the AP Comp Sci test. Next year, I am doing an individual study for programming, which is a pass/fail class, and I'm debating what to do programming-wise.

So far, I have done, in school:
.5 semesters of leaning the basics of how computers work (e.g.- difference between high- and low-level programming, machine code studies, etc.)
1.0 semester of QuickBASIC
1.5 semesters of VB6
1.5 semesters of C++
1.0 semesters of Java
tidbits of HTML

That really should have come out to 6 semesters, but oh well. After AP tests this year, we really didn't do much in that class.

So far, I have done, out of school:
having fun with DOS, messing around with/using various Linux "flavors," some BlitzBASIC, a good deal of Java, some Silverlight, and just stepping into .net

Since I have no job this summer, or really anything to apart from cubing and the occasional "hanging out," I've decided to program a lot over the summer, since I aspire, like many on these forums, to become a programmer (or a high-school level programming teacher).

Given the fact that I'm very much willing to do a good four hours a day of programming, (except for Sundays; everyone needs a break) what do you suggest I practice?

I, no matter what language(s) I choose to take up, plan on doing database work, as I have VERY LITTLE experience in that general area, and it would be very much needed in a real-life situation.

Thank you all for reading this and suggesting what to practice.

Live long and prosper,
Stachu Korick


----------



## Stefan (Jun 5, 2009)

Did you participate in any programming competitions yet? Those are fun and very helpful to become better.


----------



## Swoncen (Jun 5, 2009)

I would suggest you should not concentrate on a specific programming language but trying to solve some problems with ANY of those you know. Database programming is boring in my opinion but it's also easy to learn. Try to make up interesting projects to work on. It's maybe just my opinion because I'm not a programmer but a researcher and there is no reason for me to learn all kinds of languages because if you really need a programming language you're not experienced in, you can easily learn it with your knowledge of other programming languages.


----------



## Johannes91 (Jun 5, 2009)

Swoncen said:


> ... if you really need a programming language you're not experienced in, you can easily learn it with your knowledge of other programming languages.


Only if it's similar to one of the languages you know. I agree that learning many similar languages unless you need them isn't that useful, but learning several very different languages is a very good idea IMHO.

Solving algorithm problems in competitions or on websites like Project Euler is a good way to learn. A twisty puzzle solver or an AI for a board game might be a good project, but it really depends on what you like doing.

If you've only programmed in the 4 languages you listed, I'd suggest trying some others, too. But I've been brainwashed so don't listen to me.


----------



## StachuK1992 (Jun 5, 2009)

StefanPochmann said:


> Did you participate in any programming competitions yet? Those are fun and very helpful to become better.


No. How do I find out about these? I don't want to travel too far for one, but an hour or so isn't unreasonable.



Swoncen said:


> I would suggest you should not concentrate on a specific programming language but trying to solve some problems with ANY of those you know. Database programming is boring in my opinion but it's also easy to learn. Try to make up interesting projects to work on. It's maybe just my opinion because I'm not a programmer but a researcher and there is no reason for me to learn all kinds of languages because if you really need a programming language you're not experienced in, you can easily learn it with your knowledge of other programming languages.



"I would suggest you should not concentrate on a specific programming language but trying to solve some problems with ANY of those you know."
While I agree with this to some extent, I think that doing such tasks with languages that colleges teach and grade on may be the best decision.

"Database programming is boring in my opinion but it's also easy to learn."
I'll definitely be doing database work to some degree. Maybe not much, but enough to keep me going.

As far as fun projects go, I have a few ideas, so I'm good as far as that goes.


----------



## Stefan (Jun 5, 2009)

Stachuk1992 said:


> StefanPochmann said:
> 
> 
> > Did you participate in any programming competitions yet? Those are fun and very helpful to become better.
> ...


Try topcoder, they're mostly online and great. There you can also see the solutions of others and learn from them.


----------



## Swoncen (Jun 5, 2009)

Johannes91 said:


> Swoncen said:
> 
> 
> > ... if you really need a programming language you're not experienced in, you can easily learn it with your knowledge of other programming languages.
> ...



Most of the programming languages are similar. The above mentioned are very similar to each other - it's just about the syntax. There are even other languages like logic-programming languages but also there you can aply your knowledge and it's very easy to learn. It's for sure better on your application letter to write down more then less. I have a friend who knows alot of languages and we had a project together one day and he didn't know how to start.


----------



## Johannes91 (Jun 5, 2009)

Swoncen said:


> The above mentioned are very similar to each other - it's just about the syntax.


Yes, those are similar.



Swoncen said:


> There are even other languages like logic-programming languages but also there you can aply your knowledge and it's very easy to learn.


And functional programming languages and lisps and array programming languages and ... Yes there are some similarities in all of them, but at least for me, the differences are big enough that learning the first language from each paradigm hasn't been just easily learning a new syntax.

The most widely used languages today are procedural or OO, but other kinds of languages are used, too, and they are very good for some things.


----------



## tim (Jun 5, 2009)

Stachuk1992 said:


> Hello all,
> Given the fact that I'm very much willing to do a good four hours a day of programming, (except for Sundays; everyone needs a break) what do you suggest I practice?
> 
> I, no matter what language(s) I choose to take up, plan on doing database work, as I have VERY LITTLE experience in that general area, and it would be very much needed in a real-life situation.
> ...



Some things you might want to try:
1.) Learn other languages. The ones you've already learned are kinda the same. (Python/Ruby, Smalltalk, Haskell, ...)
2.) Learn basic Algorithms & Data Structure stuff. Unfortunately i can't suggest a book.
3.) Learn other programming paradigms (like aspect-oriented programming)
4.) If you want to do some database stuff, you should read about object-relational mapping and read Martin Fowler's "Patterns of Enterprise Application Architecture" book. I know that's not really necessary to get a database application running, but i found it really interesting.
4.5.) Read about SQL and database design in general.
5.) Read Martin Fowler's book about Refactoring.
6.) Read all books and all articles from Martin Fowler. (Yeah, i'm a fan!)
7.) Create projects and work on them constantly. You probably learn the most by working on and finishing(!!!) a project. It's relatively easy to get a project 80% done and you might think: "ah, the rest is easy, it's just some classes here and some objects here, ...". But that's usually not true. I found the most annoying problems during implementing the "last two features" which led to refactoring a whole bunch of code.
8.) If you aren't fully familiar with object-oriented programming, read "Head First Design Patterns".
9.) Try to "master" one programming language. I don't know if that's really helpful, but that's definitely a thing i want to do in the future.

I'm not a super experienced programmer, so my suggestions might just be crap. Sorry, if that's the case .


----------



## tim (Jun 5, 2009)

Swoncen said:


> Database programming is boring in my opinion but it's also easy to learn.



What do you mean by "database programming"? Writing a bunch of simple SQL statements to query a database is boring. But writing your own ORM layer isn't in my opinion. Designing a database schema for more complex applications isn't boring either.


----------



## teller (Jun 6, 2009)

Databases can get pretty hard. A friend of mine is a data warehouse specialist, and the sheer volume of data is just nuts over there. But writing complex queries can be pretty fun. I love SQL2005, and a free version is available here:

http://www.microsoft.com/Sqlserver/2005/en/us/express.aspx

Languages...eh...if you have ANY web aspirations you must learn JavaScript. The back-end might be .net but on the browser that's your only choice. jQuery is a nice helper framework.

.NET is screwy. It tries to hide the http protocol, which is just silly, and C# is so type-strict you can't breathe. And then Microsoft will change everything right after you learn it. But it's a living.


----------



## StachuK1992 (Jun 6, 2009)

tim said:


> Stachuk1992 said:
> 
> 
> > Hello all,
> ...



1-I have been thinking about Python. Badmephisto seems to be quite obsessed about it. 
2-What do you mean by this? I know what an algorithm is in terms of programming, but what exactly do you mean by "basic algorithms"?
3-Using QuickBASIC before, I've obviously done top-down programming, but I will look into other paradigms later on this evening.
4, 5, 6-Both of my parents program for a living, and we have tons and tons of .net (a lot of ASP), C#, and SQL server books just laying around, so I'm good as far as that goes. And I plan to read up on this man whom you seem so enthralled by.
7-I'm currently working on a rather large (by my scale) Java program, which consists of handling a rather extensive high-score table; you may have seen this from a while ago, but I had to put that on hold for a while. :/
8-I'm quite familiar with OOP
9-I like Java. Would this be a fine choice?




teller said:


> Databases can get pretty hard. A friend of mine is a data warehouse specialist, and the sheer volume of data is just nuts over there. But writing complex queries can be pretty fun. I love SQL2005, and a free version is available here:
> 
> http://www.microsoft.com/Sqlserver/2005/en/us/express.aspx
> 
> ...



I plan to start with databases in a month, but I'd have to agree with your apparent dislike of .net; it's just not a fun set of tools at all.


----------



## ajmorgan25 (Jun 6, 2009)

Stachuk1992 said:


> 1-I have been thinking about Python. Badmephisto seems to be quite obsessed about it.
> .



I'm taking a Python course right now. It's my first one so I can't tell you much. Badmephisto is definitely the go-to guy for that.


----------



## StachuK1992 (Jun 6, 2009)

ajmorgan25 said:


> Stachuk1992 said:
> 
> 
> > 1-I have been thinking about Python. Badmephisto seems to be quite obsessed about it.
> ...


Compared to other languages, are you enjoying it?
My only problem is that I may not enjoy certain aspects of programming, and fail to program because of this.


----------



## ajmorgan25 (Jun 6, 2009)

Stachuk1992 said:


> ajmorgan25 said:
> 
> 
> > Stachuk1992 said:
> ...



Well, it is only my second programming course so I only had one more before it. It was a language the teacher created himself but he said it was very similar to C++. Assuming it is, Python is *way* better than C++. Much cleaner.


----------



## StachuK1992 (Jun 6, 2009)

ajmorgan25 said:


> Stachuk1992 said:
> 
> 
> > ajmorgan25 said:
> ...



I'm not familiar at all with python. What tools do you use to program?


----------



## CanadianPires (Jun 6, 2009)

tim said:


> Stachuk1992 said:
> 
> 
> > 2.) Learn basic Algorithms & Data Structure stuff. Unfortunately i can't suggest a book.
> ...



http://en.wikipedia.org/wiki/Sorting_algorithm
http://en.wikipedia.org/wiki/Search_algorithm

I agree you should learn a language different than the ones you currently know and Python is a good choice. Also, online competitions like Euler project will give you stuff to code consistently and it will cover a good scope that may include tasks/projects you wouldn't think to try.


----------



## tim (Jun 6, 2009)

Stachuk1992 said:


> ajmorgan25 said:
> 
> 
> > Stachuk1992 said:
> ...



A text editor with syntax highlighting.


----------



## StachuK1992 (Jun 6, 2009)

http://www.youtube.com/watch?v=8LQkVcqWPhc
I just watched that; wow. A crapload of resources.
Alright. I'm going to watch these over the next weeks, then start on python.

By the way, I'm already familiar with quite a few sorts, such as Binary Tree sort, quick sort, etc, and have programmed them for fun as well. I am also familiar with a few search algorithms. This clears up information from earlier; thanks.


----------



## joey (Jun 6, 2009)

learn2gvim


----------



## ajmorgan25 (Jun 6, 2009)

tim said:


> Stachuk1992 said:
> 
> 
> > ajmorgan25 said:
> ...


Pretty much.


----------



## Johannes91 (Jun 6, 2009)

tim said:


> Stachuk1992 said:
> 
> 
> > I'm not familiar at all with python. What tools do you use to program?
> ...



Also, the REPL. Beats me how some people can be perfectly happy with only edit-save-compile-run...


----------



## tim (Jun 6, 2009)

Stachuk1992 said:


> 3-Using QuickBASIC before, I've obviously done *top-down* programming, but I will look into other paradigms later on this evening.
> 9-I like Java. Would this be a fine choice?


3.) That's what i meant with algorithms and data structures. (other paradigms: divide-and-conquer, bottom-up and dynamic programming)
9.) Probably.
Just an example

```
class Test {
	public static void main(String[] args) {
		Integer a = 12;
		Integer b = 12;
		System.out.println(a == b); // => true
		
		a = 1000;
		b = 1000;
		System.out.println(a == b); // => false
	}
}
```
Have a look at Integer.valueOf(int) if you want to now, what's going on .




Johannes91 said:


> tim said:
> 
> 
> > Stachuk1992 said:
> ...



Don't worry, i use irb a lot.


----------



## badmephisto (Jun 8, 2009)

hi stach.
I don't think you will benefit from watching those lectures.

Get dirty and start making some games or something, the rest you will learn on the go as you need it.
Get the pygame library, look into some example code and projects they have on their websites, learn by example, and start making your own stuff.
If you can see the "fruits" of your labor, and have something to show for your efforts, it will motivate you further.


----------



## StachuK1992 (Jun 8, 2009)

badmephisto said:


> hi stach.
> I don't think you will benefit from watching those lectures.
> 
> Get dirty and start making some games or something, the rest you will learn on the go as you need it.
> ...


Ah. meph,
I knew you would just love to push me into the realm that is python. 

The problem, my dad "doesn't want me wasting my summer away," and says that I *have* to do database work at some point over the summer. 
Also, every week he is expecting something to show for my efforts. :/
If I make a game, everything's going to be, well, unfinished, a few weeks in a row.

Thanks for your input everyone. 
Stachu (not stach, meph, unless you were trying to give me a nick name )


----------



## badmephisto (Jun 8, 2009)

I don't see how making games would be a waste. It is a fun way to get into coding, explore coding paradigms and learn good coding practices. And why should a game necessarily take few weeks? Make a small game... and forget flashy graphics, sound, etc. It can also get you to explore other interesting areas because for example you may need some simple physics, or you may need some AI for the "bad guys", etc... You would definitely learn a lot

The reality is that databases are pretty hardcore stuff, and you can write books on the whole topic. The entire area is imo, very dry and very specific. Its something you would do if you work for a giant corporation, not something you would pick up over the summer for funzies


EDIT:
btw learning Flash/Actionscript would be my second best recommendation. It lets you do quick and dirty stuff VERY quickly, no "starter code" is necessary, and can be very easily shared because it runs in a browser. it depends on what you want to do. You can do more with Python obviously. Flash is specifically tailored towards visual applications, and has SIGNIFICANT restrictions on access to computer files, and stuff like that...


----------



## joey (Jun 8, 2009)

PYTHON 
You shouldn't "have to show something to your dad every week". Or if you want to do it like that, he should set you a task of a program to make for that week, and then you can show it at then end of the week.

Database work.. isn't programming. *Most* languages will have a mature database layer API, so you would end up using that.. but you have to have something to *do* with the data don't you


----------



## AvGalen (Jun 8, 2009)

Database work...can be programming. Big databases (like MSSQL) can have custom data types, variables, loop structures, triggers, cursors, etc.

It also doesn't have to be boring at all. Just have a look at the wonderful thing available at http://www.worldcubeassociation.org/results/index.php. Almost all of the work will be done by a database and queries behind the scenes. input/parsing/output is much more boring than the actual database design and querying.


----------



## StachuK1992 (Jun 8, 2009)

badmephisto said:


> I don't see how making games would be a waste. It is a fun way to get into coding, explore coding paradigms and learn good coding practices. And why should a game necessarily take few weeks? Make a small game... and forget flashy graphics, sound, etc. It can also get you to explore other interesting areas because for example you may need some simple physics, or you may need some AI for the "bad guys", etc... You would definitely learn a lot
> 
> The reality is that databases are pretty hardcore stuff, and you can write books on the whole topic. The entire area is imo, very dry and very specific. Its something you would do if you work for a giant corporation, not something you would pick up over the summer for funzies
> 
> ...



I'm a very...uncreative person; the only hard-core "game" that I've ever made was 3d tic-tac-toe with VB a while back. Of course, I've done games since, just smaller ones.

For some reason, my dad's really stuck on me learning databases, and it seems that there's no way around that.

As for flash/Actionscript, they don't appeal to me, at least for now.



joey said:


> PYTHON
> You shouldn't "have to show something to your dad every week". Or if you want to do it like that, he should set you a task of a program to make for that week, and then you can show it at then end of the week.
> 
> Database work.. isn't programming. *Most* languages will have a mature database layer API, so you would end up using that.. but you have to have something to *do* with the data don't you


"You shouldn't 'have to show something to your dad every week'."
-unfortunately, that's not my decision. :/
Again, doing databases; sorry.



AvGalen said:


> Database work...can be programming. Big databases (like MSSQL) can have custom data types, variables, loop structures, triggers, cursors, etc.
> 
> It also doesn't have to be boring at all. Just have a look at the wonderful thing available at http://www.worldcubeassociation.org/results/index.php. Almost all of the work will be done by a database and queries behind the scenes. input/parsing/output is much more boring than the actual database design and querying.



But how does one jump into the database world? Just start reading?

We've got plenty of SQL Server books just laying around, but none of them seem to be for beginners. :/


----------



## AvGalen (Jun 8, 2009)

How to start with databases?

What about one of these:
Text: http://www.w3schools.com/sql/sql_intro.asp
Video: http://www.asp.net/LEARN/sql-videos/


----------



## StachuK1992 (Jun 8, 2009)

AvGalen said:


> How to start with databases?
> 
> What about one of these:
> Text: http://www.w3schools.com/sql/sql_intro.asp
> Video: http://www.asp.net/LEARN/sql-videos/


sweet; thanks!

I'll do the video one, since I tend to learn better that way. 

I guess I know what I'm doing today.


----------



## joey (Jun 8, 2009)

AvGalen said:


> Database work...can be programming. Big databases (like MSSQL) can have custom data types, variables, loop structures, triggers, cursors, etc.


http://99-bottles-of-beer.net/language-mysql-1252.html
Yeh, I guess it can be programming 

I'm not saying don't work with DB's.. I'm just saying you should find some project to work with them on.

Make a tic-tac-toe game that records all the games or something. Who knows!


----------

