# Computer programming



## jeff081692 (Dec 30, 2007)

Hi. I want to make a program that tests me on the algorithms I know and time me kind of like PLL trainer but I have no clue where to start. Can anybody point me in the right direction on how to make a program like this? I plan on being a programmer in the future so making this program would help me in two ways.


----------



## badmephisto (Dec 30, 2007)

first step: pick a language.

I made PLL Trainer in Visual Basic 6. Although it is very easy to make an Interface program like that in VB6, Visual Basic is a terrible programming language, as a whole. 
VB .NET could be good for this, you might wanna look into that. I never personally tried it, but it's easy to make interface in that one too, and hopefully .NET is better programming language, and I know that many developers use it.

JNetCube was done in Java; a pretty good language. Most likely it is using the Swing library for the Interface though, which is a complete disaster, and it will be hard to try and find something more stupid than the Swing library, possibly in the entire universe.

One other language that is right now my favorite is Python. Very nice little neat programming language, and it has some Interface libraries that I didn't take a look at yet, so I don't know about those. I would recommend learning Python and giving that a shot. The downside to Python (and it is a pretty big one right now) is that not too many people have it. Certainly most of the newbie people don't, and while there are ways to convert your Python scripts to .exe executables using pyexe, it isn't always flawless and I had trouble with it before. 

It really depends on your experience as a programmer from before. Without that I can't tell you more.


----------



## jeff081692 (Dec 30, 2007)

Thanks I will try to look into all of that.


----------



## Johannes91 (Dec 30, 2007)

badmephisto said:


> Java; a pretty good language.




Forget about graphics, make it text based at first. Some people think that Python is __very__ __easy__ to learn for beginners, so it might be a good choice as a first language. It's also available outside Windows (unlike Visual Basic), so you're free to switch to a better OS without leaving Python.

But it doesn't matter much which language you choose, picking up new ones becomes very easy once you know a few from different paradigms.


----------



## Lotsofsloths (Dec 30, 2007)

I made mine in powerpoint(simple things work ), too lazy to make an application with C++


----------



## pjk (Dec 30, 2007)

I haven't used Python, so I can't speak for it. However, you could do it in Java quite easily.


----------



## AvGalen (Dec 30, 2007)

First, you should write down what you want the program to do!


----------



## ExoCorsair (Dec 30, 2007)

Regarding learning Python: http://bash.org/?780063


----------



## AvGalen (Dec 30, 2007)

Could everyone please stop telling him which language to use? First he needs to decide what he actually wants to accomplish. 

P.S. .NET is not a language. You can program in C++.NET, VB.NET, C#.NET, J#.NET, Ruby on Rails.NET, Python.NET and about 30 others. If you are interested in these, check out http://www.microsoft.com/learning/developer/default.mspx and download from http://www.microsoft.com/express/download/ (for free)


----------



## badmephisto (Dec 30, 2007)

AvGalen said:


> Could everyone please stop telling him which language to use? First he needs to decide what he actually wants to accomplish.
> 
> P.S. .NET is not a language. You can program in C++.NET, VB.NET, C#.NET, J#.NET, Ruby on Rails.NET, Python.NET and about 30 others. If you are interested in these, check out http://www.microsoft.com/learning/developer/default.mspx and download from http://www.microsoft.com/express/download/ (for free)



Actually all .NET languages share a Common Type System, and they compile into Common Intermediate Language, so really, all those languages are just one .NET language , the differences are really mostly just a matter of syntax.

Anyway, I agree that he should have a clear idea of what he wants to do first. But C# or something in the .NET framework would probably be a good choice. I never worked in it, but a friend was showing me how easily he was creating an interface in their GUI interface builder, and it generated the code for him; that was nice and it looked easy. Maybe someone who actually worked with it could elaborate.
The downside of course is that this isn't really cross platform, but most of the people have wine emulators and stuff, so it isn't that big of a deal.


----------



## jeff081692 (Dec 30, 2007)

Well I want to make a simple program that can time me on the algorithms I know. A picture of the cube and the set up move comes up and I use the space bar to start and stop the timer. And everytime I learn a new algorithm I will put it into the program.


----------



## AvGalen (Dec 30, 2007)

badmephisto said:


> AvGalen said:
> 
> 
> > Could everyone please stop telling him which language to use? First he needs to decide what he actually wants to accomplish.
> ...


Just because they all compile to Intermediate Language doesn't mean they are one language. The concepts behind these languages can vary greatly (VB.NET vs C++.NET) and go much further than just a matter of syntax. However they all rely on the .NET Framework and can benefit from the enormous amount of built-in functionality.

For a beginning programmer I would recommend VB.NET (Express) because that is really the easiest language (very simular to plain english) to start building simple programs. The link I posted to Visual Studio Express would be a very good tool to start building GUI applications with. 

Finally, you don't need "wine emulators and stuff". You just need Mono (for Linux)


----------



## Stefan (Dec 30, 2007)

badmephisto said:


> Actually all .NET languages share a Common Type System, and they compile into Common Intermediate Language, so really, all those languages are just one .NET language , the differences are really mostly just a matter of syntax.


Are Lisp, Java, Prolog and SML also just one language? I mean, in the end, they're all reduced to assembly since that's the only language the processor actually understands.


----------



## badmephisto (Dec 30, 2007)

StefanPochmann said:


> badmephisto said:
> 
> 
> > Actually all .NET languages share a Common Type System, and they compile into Common Intermediate Language, so really, all those languages are just one .NET language , the differences are really mostly just a matter of syntax.
> ...



it is arguably true. as a matter of fact i had just this discussion with a professor just before the semester was over. We were discussing the complete redundancy in the vast amount of all programming languages. I don't know if you've heard of Scheme? We sometimes jokingly refer to it as Lisp 2.0. I am not sure if there are other language like Scheme right now, but Scheme allows you to build macro's that effectively let you modify the actual syntax of the programming language. And the prof is now doing research on how to actually build other programming languages from Scheme. For example Java syntax was already pretty much reproduced in Scheme, and I'm sure more could follow. So his idea is pretty much that there should be one master language for programming. Theoretically this is a nice concept but I doubt it can ever work in practice, unfortunately. For example Java is very restrictive in it's syntax and rules, but maybe that's a good thing when you are dealing with hundreds of developers, each doing their own thing.
Anyway this is not a topic for this thread, but it's an interesting anyway.

and jeff, for that it seems VB.NET is indeed a pretty good start. I'm going to refer you to one website that I used when I was starting out with Visual Basic, it is basically just a giant forum where you can ask questions should you come across some difficulties:

http://www.xtremevbtalk.com/

good luck


----------



## tim (Dec 31, 2007)

AvGalen said:


> ...Ruby on Rails.NET...



You propably meant Ruby.NET. (on) Rails is a framework, written in Ruby.


----------



## Lotsofsloths (Dec 31, 2007)

If you want a program that simple, just use powerpoint!!
I made a program that does what you mentioned and plays music to keep the boredom away!(all in powerpoint)


----------



## jeff081692 (Dec 31, 2007)

I will do power point for now but since I want to be a programmer I wanted to get a little experience in making a program because right now I don't really know anything. I have some good resources to look into now and I will make the kind I want after I get sub 20 with COLL because I will really need it when I start ZBLL.


----------



## Johannes91 (Dec 31, 2007)

AvGalen said:


> For a beginning programmer I would recommend *VB.NET* (Express) because that *is really the easiest language* (very simular to plain english) to start building simple programs.


Umm, how many (and what) programming languages do you know? It's ridiculous to say that any single one is "the easiest". I'd actually claim that brain**** is among the very easiest, it takes just a few minutes to learn and you can easily do simple things with it.

Being similar to natural languages isn't necessarily a good thing (ugh, just look at AppleScript). I prefer languages that look more like math than English.




badmephisto said:


> We sometimes jokingly refer to [Scheme] as Lisp 2.0.


Why? Scheme is actually a Lisp-1, meaning it has only one namespace. Common Lisp is a Lisp-2.



badmephisto said:


> I am not sure if there are other language like Scheme right now, but Scheme allows you to build macro's that effectively let you modify the actual syntax of the programming language.


Macros are common in all Lisps, and Common Lisp has even more powerful macros than Scheme.




ExoCorsair said:


> Regarding learning Python: http://bash.org/?780063


Ok, I'll try:

```
fac 0 = 1
fac n = n * fac (n-1)

fac2 n | n == 0    = 1
       | otherwise = n * fac2 (n-1)
```

Yay, both work!
...but it's Haskell, not Python.


----------



## badmephisto (Dec 31, 2007)

i actually like to agree with you Johannes on preferring languages that have syntax very similar to math. Natural Language is one giant ambiguous mess. 

By the way, have you seen all the funny programming languages that people thought of, such as the LOLCATs programming language LOLCODE? 
One other comes to mind called Chef:
http://en.wikipedia.org/wiki/Chef_(programming_language)
Also the Whitespace programming language? 
One really crazy branch as well are programming languages where a program is just a picture. I'm sure you heard of most of the above

Programming Languages are so much fun


----------



## AvGalen (Dec 31, 2007)

Can everyone please stop this and move it to a programming forum?

I think jeff081692 has all the information he needs and discussing programming languages (especially those that < 1 % of the worlds programmers use) might be fun and educational, but this is not the place for it.


----------



## Johannes91 (Dec 31, 2007)

AvGalen said:


> Can everyone please stop this and move it to a programming forum?


Why? *You* are actively posting to a ridiculously long thread that was started by a spammer. But I don't complain, I just ignore it.

If you don't want to discuss programming, just ignore this thread.



AvGalen said:


> discussing programming languages ... might be fun and educational, but this is not the place for it.


"_All non-cube related discussion goes here._"


----------



## AvGalen (Dec 31, 2007)

You are right Johannes, I didn't realize this was in the Off-Topic Discussion forum.

I still don't think this is the best place for a discussion like this (maybe we should have a topic about taking care of pets next), but if you would like to discuss this here, go ahead.


----------



## jeff081692 (Dec 31, 2007)

Johannes91 I didn't know I was a spammer and I am sorry and will try not to post as much things anymore. But I asked a question and got an answer but the thread continued thats now my fault.


----------



## Karthik (Dec 31, 2007)

jeff081692 said:


> Johannes91 I didn't know I was a spammer and I am sorry and will try not to post as much things anymore. But I asked a question and got an answer but the thread continued thats now my fault.


I don't think he was referring to you.


----------



## Johannes91 (Dec 31, 2007)

I was referring to this thread: http://www.speedsolving.com/showthread.php?t=318.


----------



## jeff081692 (Dec 31, 2007)

O ok its just that in the past I have realized that I do have a spamming problem so I try not to type that much. And I have tried to be extra careful about spamming on the forum because I am on here alot.


----------



## AvGalen (Dec 31, 2007)

I really don't care that that topic was started by a spammer. We haven't seen him anymore after that one post and apparently people liked the idea. I have learned a lot about the other members on this forum because of that thread and I still enjoy reading/posting there.


----------



## badmephisto (Dec 31, 2007)

I thought jeff's answer was already kind of answered. And conveniently enough, the thread has a very generic name (Computer Programming), so maybe we can just transform it into a huge discussion of programming in general  ?
I think it would just be me and Johannes arguing though, with the occasional cryptic 5 word responses from Stefan picking on little details.


----------



## tegalogic (Jan 3, 2008)

Because we are discussing general programming now... (I think)


badmephisto said:


> i actually like to agree with you Johannes on preferring languages that have syntax very similar to math. Natural Language is one giant ambiguous mess.
> 
> By the way, have you seen all the funny programming languages that people thought of, such as the LOLCATs programming language LOLCODE?
> One other comes to mind called Chef:
> ...


I just came up with the idea of a cubing-based esoteric language. Like with RUFMESxyz notation, or something. That would be strange


----------



## ShadenSmith (Jan 4, 2008)

I support the idea of a programming thread. 

I noticed quite a bit of Python support. I'm a pretty big fan of it myself, I use it to teach a game-development class at my high school. Coupled with the library PyGame, it's a pretty powerful tool for inexperienced programmers.

I've also done some work with Java, VB, and C#.NET. What about you all?


----------



## AvGalen (Jan 4, 2008)

I am very experienced with all shapes and sizes of Visual Basic (VB4/5/6, VB.NET, VBA, VBScript) and do most programming in C# right now. JavaScript is one of the things I used to do a lot, but not anymore. Finally some Delphi/Pascal and Java. (I don't consider HTML and SQL programming languages)

I used to study commercial economics, but a teacher discovered my talent for IT and asked me to become a highschool (18-22 years in The Netherlands) teacher. I taught programming for a year and I have been in webdevelopment (and lots of other programming stuff) for 8 years now.


----------



## ShadenSmith (Jan 4, 2008)

I've done some C# stuff, nothing major though. Once I get a video card that supports 3D I'll be working with XNA Studios.


----------



## ExoCorsair (Jan 5, 2008)

I was always wondering what advantages C# has over C++ (C# is too much like Java for me)... Someone care to enlighten me?


----------



## tim (Jan 5, 2008)

ExoCorsair said:


> I was always wondering what advantages C# has over C++ (C# is too much like Java for me)... Someone care to enlighten me?



- garbage collector
- completely oo
- less chances to write bad hacks
- delegates
tbc.


----------



## AvGalen (Jan 5, 2008)

ExoCorsair said:


> I was always wondering what advantages C# has over C++ (C# is too much like Java for me)... Someone care to enlighten me?


 
This is a pretty good and short summary: http://www.softsteel.co.uk/tutorials/cSharp/lesson2.html

This is how Microsoft positions VB, C# and C++
VB: Easiest, but least control
C#: More control, but a little more difficult
C++: Most control, but also most difficult
(there is much more to this, but this is a good way to summarize it)


----------

