• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

Your Programming FUCK YEAH moments.

Status
Not open for further replies.
Pretty much just the "Hello World" thing that's been repeated here a couple of times. I did write a program that would solve an algebra problem based on the numbers you put in too. I was pretty damn happy when I got it working.

That was about three years ago, haven't programmed anything since then. Taking my first CS class this Fall though.
 
Toma said:
Hopefully, this is somewhat understandable. This is not all correct C# stuff, only my mind notes.

[…]

Fuck yeah! God, I love programming.
Oh okay. I don't see why it works, but that's on me!

Well, I'm happy you cracked it. Good one.
 
FUCK YEAH! I just programmed my first ever game! Its a black and white breakout clone, and basically all you do is reflect the fixed velocity ball until all of the bricks are gone, but I got the collision detection working, I got the deletion of the bricks working, and I got the paddle control working.

Feels good man.

Unfortunately its a right mess of a program, and there were four or five times while writing it where I said "this is really bad practice/redundant/whatever, but I'll come back to it" so now I'm going to rewrite the whole thing from scratch and see if I can clean it up.
 
The_Technomancer said:
FUCK YEAH! I just programmed my first ever game! Its a black and white breakout clone, and basically all you do is reflect the fixed velocity ball until all of the bricks are gone, but I got the collision detection working, I got the deletion of the bricks working, and I got the paddle control working.

Feels good man.

Unfortunately its a right mess of a program, and there were four or five times while writing it where I said "this is really bad practice/redundant/whatever, but I'll come back to it" so now I'm going to rewrite the whole thing from scratch and see if I can clean it up.

High Five!

As soon as I got C# to understand how to use my algorithm I'll go fuck yeah another time as well. I would have thought coming up with the algorithm was the hardest part... well, not quite.

<-- Currently lost in loops.

Edit: Well, that was faster than expected, I had put a counter in the wrong outer loop which messed up EVERYTHING.
Hs8cX.jpg


Yay! It finally, FINALLY, creates all the matches so that every team plays exactly once each day.

So, High Five!

Next steps:
-Cleaning up some stuff
-Going out of range with the previous/next day buttons crashes the game - add exceptions.
-make uneven numbered leagues possible
-Add a way to enter values for matches that can be updated in the table.
Create the 2nd half of the matchmaking system (just mirror the first half)
-add a way to simulate remaining games of a day, that werent played already
-Save system ( I am so not looking forward to that)
 
Small Update:

Tc3iN.jpg


Quite a relief I finally got that working. But unfortunately isnt quite working perfectly. Every score I enter on the first day, will get updated correctly. But not for the other days. The fix is probably easy, I just need to find where the problem is located.

Stuff to do:
-Going out of range with the previous/next day buttons crashes the game - add exceptions.
-make uneven numbered leagues possible
-Add a way to enter values for matches that can be updated in the table.
-make the other days work as well
-need to prevent that results for one match keep adding up if you change and update the table
-Create the 2nd half of the matchmaking system (just mirror the first half)
-add a way to simulate remaining games of a day, that werent played already
-Save system ( I am so not looking forward to that)
 
Kalnos said:
It really isn't that bad Toma. Writing/Reading from files is pretty easy in .NET.

I only wrote stuff in and out of text files so far. I imagine there is a much more elegant/useful way of using databases or something like that, which I already tried to look into, but lets say... I am not looking forward to it at the moment.
 
Oh god I can't stop. I spent most of yesterday optimizing my Breakout game and most of today applying what I learned to what I hope will be a simple platformer engine. I'm currently trying to successfully implement a system that will change between states like "pause, play, menu, load screen"

I feel like my brain is about to throw up.


Toma said:
I only wrote stuff in and out of text files so far. I imagine there is a much more elegant/useful way of using databases or something like that, which I already tried to look into, but lets say... I am not looking forward to it at the moment.
Writing and reading from binary isn't that much more difficult, as long as you make sure that your write and read routines are exact inverses of each other.
 
Toma said:
I only wrote stuff in and out of text files so far. I imagine there is a much more elegant/useful way of using databases or something like that, which I already tried to look into, but lets say... I am not looking forward to it at the moment.

Nah, I think text files would be fine for your project unless you have *a lot* of data.

Techno: Just use an enum for gamestates, I don't think you really need an abstract gamestate class or anything.
 
The_Technomancer said:
Oh god I can't stop.

I so totally know what you mean. I am also on a programming frenzy right now. When the basics are done I want to try myself onto a simple match comment system that you can view as match reports "5. Minute: He got fouled! Foul! Yellow Card of XXX!" etc.

But thats still long way off.
 
Kalnos said:
Nah, I think text files would be fine for your project unless you have *a lot* of data.

Techno: Just use an enum for gamestates, I don't think you really need an abstract gamestate class or anything.

I need to learn it eventually anyway. But if you say thats way too advanced for my current abilities I'll stick to my .txt guns.

Btw it seems that you know every major programming language, the way you are helping everyone out. Kind of amazing.
 
Toma said:
I need to learn it eventually anyway. But if you say thats way too advanced for my current abilities I'll stick to my .txt guns.

Btw it seems that you know every major programming language, the way you are helping everyone out. Kind of amazing.

check out linq-to-sql and sql server 2008 express
 
Toma said:
I need to learn it eventually anyway. But if you say thats way too advanced for my current abilities I'll stick to my .txt guns.

Btw it seems that you know every major programming language, the way you are helping everyone out. Kind of amazing.

No, no I really don't all of them.
KuGsj.gif
I think I confidently know C#, VB.NET, Java and C++. After you learn C++ you can really switch between most other languages fairly effortlessly as most of the concepts are the same between them. Also, posting on gamedev.net frequently and working on hobbyist things whilst majoring in computer engineering, you learn quite a bit after a few years.

Something like SQL for database purposes is not below your current ability, I just think it's unnecessary complexity really. If you're just making a simple game/software than .txt is fine or .xml if you're really feeling ambitious and needy.

Though, if you're looking into programming as a profession I highly recommend learning SQL, I think 9/10 companies I talked to asked me if I knew anything about SQL.
 
Kalnos said:
Nah, I think text files would be fine for your project unless you have *a lot* of data.

Techno: Just use an enum for gamestates, I don't think you really need an abstract gamestate class or anything.
Yeah, what I'm looking at is as follows: the game refreshes every frame, right? Redrawing all objects, checking for inputs and calculating "physics" and such. I'm going to structure the body of that refresh period as a switch case based on an enumerator, so that each time through the loop it switches to the current state.
 
The_Technomancer said:
Yeah, what I'm looking at is as follows: the game refreshes every frame, right? Redrawing all objects, checking for inputs and calculating "physics" and such. I'm going to structure the body of that refresh period as a switch case based on an enumerator, so that each time through the loop it switches to the current state.

Yeah, that sounds ideal for a breakout clone IMO but just keep in mind if you're planning on reusing this code it will become unmanageable in larger projects. Not only will you have to rebuild the project every time you add a new state but your switch statement will grow larger and larger (and uglier).
 
Kalnos said:
Yeah, that sounds ideal for a breakout clone IMO but just keep in mind if you're planning on reusing this code it will become unmanageable in larger projects. Not only will you have to rebuild the project every time you add a new state but your switch statement will grow larger and larger (and uglier).
Well I'm displacing a lot of the actual code inside the loop into a System class (System::InputCheck, System::Draw, etc), so that's helping manage space.
What would you suggest for something more complicated though? My eventual goal is to get a simplistic platformer engine out of this.
 
The_Technomancer said:
Well I'm displacing a lot of the actual code inside the loop into a System class (System::InputCheck, System::Draw, etc), so that's helping manage space.
What would you suggest for something more complicated though? My eventual goal is to get a simplistic platformer engine out of this.

Eh, I would just do what you're doing until it becomes a problem and you're required to do something more complicated. You could eventually make a level-editing tool for your platformer though and have your code read from txt/xml files it creates to load levels easy.
 
Kalnos said:
Eh, I would just do what you're doing until it becomes a problem and you're required to do something more complicated. You could eventually make a level-editing tool for your platformer though and have your code read from txt/xml files it creates to load levels easy.
Oh yeah, that's definitely the plan for level storage eventually. I've already been thinking about how to build the save/load routines, as well as how to cut down on the number of collision checks required per frame.
 
my first fuck yeah moment was a little strange. i'd programmed basic a bit growing up on the suggestion of a teacher, my parents bought me turbo C++ when i was in like 6th or 7th grade. This was way before i had internet-access (1990-ish), and although it came with books, i couldn't really grasp some of the concepts. I didn't get the libraries or header files, and the books were dry as shit.

i gave up for a while and one day i was doing something unrelated and i it just hit me. i understood it somehow. i was like fuck yeah!

from that point i started writing all sorts of shit (though i still didn't get the concept of separate source files for a while, i put all of my code in header files for a year or so until i just before i started getting into assembly language. from there i built up graphics libraries and music players in assembly (kinda had to for speed purposes at the time.)

i was ecstatic when I finally got tile-scrolling engine finished. it was so optimized and silky smooth that i couldn't wait to show it to my friends so we could build a game.

getting soundblaster DMA playback working was another one. The ultrasound player was pretty simplisitc in comparison.
 
I also made a random dungeon game, but ended up turning that into a sort of submarine sonar game, and then I basically created a bunch of randomized puzzle games for myself to play. Really like random stuff as it gives endless replayability, and I like puzzle games because I can load them up and solve a couple puzzles in a minute or two whenever I have spare time. Every time I finished a game, or solved a really difficult problem I had spent an hour trying to figure out, I would have a fuck yeah moment.

I was going to make another homebrew and enter a contest this summer, but I decided not to, mostly because I'm lazy, and didn't really have the time to finish the game I felt like making (which was essentially terraria for the ds)
 
FUCK YEAH.

That stupid,stupid,stupid bug:
-make the other days work as well

took me 2 days to find. It was messing up the whole table, and it was only a 1 that was unintentionally written as a 2, which never should have happened. God damn. This feels good, I feel 10 pounds lighter, now thats been taken care of.

Since I am obviously not very good at it: Hints for bug searching?
 
Toma said:
FUCK YEAH.

That stupid,stupid,stupid bug:
-make the other days work as well

took me 2 days to find. It was messing up the whole table, and it was only a 1 that was unintentionally written as a 2, which never should have happened. God damn. This feels good, I feel 10 pounds lighter, now thats been taken care of.

Since I am obviously not very good at it: Hints for bug searching?
Experience will teach you to recognize the symptoms of a wide range of classes of bugs.

You need to be able to reproduce the bug. Know what steps results in the failure.

Reduce it to the simplest number of steps.

Think before you start slinging code.

Learn to use your debugger. Know how to set breakpoints, conditional breakpoints, step in, out, and over.

You need to buy a book called Code Complete by Steve McConnell. It has great practical advice on debugging, designing, coding, etc. Great for those just starting out.
 
deadbeef said:
Experience will teach you to recognize the symptoms of a wide range of classes of bugs.

You need to be able to reproduce the bug. Know what steps results in the failure.

Reduce it to the simplest number of steps.

Think before you start slinging code.

Learn to use your debugger. Know how to set breakpoints, conditional breakpoints, step in, out, and over.

You need to buy a book called Code Complete by Steve McConnell. It has great practical advice on debugging, designing, coding, etc. Great for those just starting out.

Thanks! I'll try to find a copy of that. 30€ should be affordable.
 
Toma said:
Thanks! I'll try to find a copy of that. 30€ should be affordable.
First edition should be fine. You can probably find it used for pretty cheap.

EDIT: Seems like some good updates (e.g OO) have been made in 2nd edition - better stick with the latest one :)
 
deadbeef said:
First edition should be fine. You can probably find it used for pretty cheap.

EDIT: Seems like some good updates (e.g OO) have been made in 2nd edition - better stick with the latest one :)

"Finding it cheap" isnt an option anyway since I live in germany. English and german scientific books are never cheap. The cheapest for the english 1st edition was 30€ and the german second one starts at 45€, but thanks :) I'll definitely look into that.
 
Getting along nicely now again :)
2 problems down, 3 to go. (for now)

-make the other days work as well
-need to prevent that results for one match keep adding up if you change and update the table

-Create the 2nd half of the matchmaking system (just mirror the first half)
-add a way to simulate remaining games of a day, that werent played already
-Save system ( I am still so not looking forward to that)
 
Toma said:
"Finding it cheap" isnt an option anyway since I live in germany. English and german scientific books are never cheap. The cheapest for the english 1st edition was 30€ and the german second one starts at 45€, but thanks :) I'll definitely look into that.

Amazon UK has it used from £3.85 - which is well under 30€, and even with international postage it's less than £10.

Edit: amazon.de has the English edition for 5,98€ including postage. Not sure why you're having such a problem "finding it cheap"...
 
I spent three days debugging an ASP application, only to find a misplaced , in one of the include files.

To say I was relieved is an understatement.
 
deadbeef said:
That looks similar in style to the cover to the first U.S. version, though since we're talking about the German version, I can't be sure.

Hm, no. The version I've linked was the english one. So I guess it is the first edition. Thanks, though :)
 
Damn you all... Now I want to learn programing!!!
I always kinda wanted to but things got in the way...

Is it plausible to hope that I can learn some useful programing on my own. Basically threat it like a hobby (2nd to gaming).

I don't know what I want to program yet, anything sounds fun, just want to create thats all :)
Fuck Yeah would be if I could write an emulator :) (man can dream right?)

So gurus... can it be done? An hour here and there... Or should I just drop it?

In case it can be done, where to start? (I imagine you all have heard this like milion times
already)

Just to add I already have a job, lovely wife and a hyperactive year old boy, but sometimes I deprive myself from sleep like now (its 2 AM here) so perhaps I can use that time to do something creative instead of surfing web :)

Thank you for your time!
 
Maffis said:
I managed to open the console in TF2 and bind P to suicide. Fuck yeah.
Somehow i'd imagine that's more like "yeah, fuck" moment... especially if you accidentally hit P afterwards.
 
Melhisedek said:
Damn you all... Now I want to learn programing!!!
I always kinda wanted to but things got in the way...

Is it plausible to hope that I can learn some useful programing on my own. Basically threat it like a hobby (2nd to gaming).

I don't know what I want to program yet, anything sounds fun, just want to create thats all :)
Fuck Yeah would be if I could write an emulator :) (man can dream right?)

So gurus... can it be done? An hour here and there... Or should I just drop it?

In case it can be done, where to start? (I imagine you all have heard this like milion times
already)

Just to add I already have a job, lovely wife and a hyperactive year old boy, but sometimes I deprive myself from sleep like now (its 2 AM here) so perhaps I can use that time to do something creative instead of surfing web :)

Thank you for your time!

Yes, you can do it as a hobby I think. But sometimes debugging will be more than an hour affair. It also depends on the complexity of your program.

If you like logic and problem solving you could probably do it.
 
Melhisedek said:
Damn you all... Now I want to learn programing!!!
I always kinda wanted to but things got in the way...

Is it plausible to hope that I can learn some useful programing on my own. Basically threat it like a hobby (2nd to gaming).

I don't know what I want to program yet, anything sounds fun, just want to create thats all :)
Fuck Yeah would be if I could write an emulator :) (man can dream right?)

So gurus... can it be done? An hour here and there... Or should I just drop it?

In case it can be done, where to start? (I imagine you all have heard this like milion times
already)

Just to add I already have a job, lovely wife and a hyperactive year old boy, but sometimes I deprive myself from sleep like now (its 2 AM here) so perhaps I can use that time to do something creative instead of surfing web :)

Thank you for your time!

Sure man, you can do it. You should at least give it a try to see how you like it. If you take to it, you never know where it might lead you.

The problem I had a long time ago when I was interested in starting to learn programming was that I didn't have the resources that exist today on the Internet. You should be able to find any number of tutorials or guides if you want to learn it online, or there are any number of great books you can use to start with.
 
Melhisedek said:
Damn you all... Now I want to learn programing!!!
I always kinda wanted to but things got in the way...

Is it plausible to hope that I can learn some useful programing on my own. Basically threat it like a hobby (2nd to gaming).

I don't know what I want to program yet, anything sounds fun, just want to create thats all :)
Fuck Yeah would be if I could write an emulator :) (man can dream right?)

So gurus... can it be done? An hour here and there... Or should I just drop it?

In case it can be done, where to start? (I imagine you all have heard this like milion times
already)

Just to add I already have a job, lovely wife and a hyperactive year old boy, but sometimes I deprive myself from sleep like now (its 2 AM here) so perhaps I can use that time to do something creative instead of surfing web :)

Thank you for your time!

You're only gonna get better with time you spend, not stupider :) An hour here and there won't have you creating awesome games in a year's time, but I would think it'd allow you to do some interesting things on your computer. I think putting in some time to programming does give you a valuable skill to get your computer to do things you wish it'd do.

If you aren't too serious, maybe start with Python or Java?
 
Opus Angelorum said:
I spent three days debugging an ASP application, only to find a misplaced , in one of the include files.

To say I was relieved is an understatement.

I've had days like this. I was debugging an OpenGL window set up by someone else. The problem was part of a polygon was going below a piece of terrain yet it wasn't being clipped. You could still see the entire polygon that should have been occluded.

I was looking at this for like 2 or 3 days and my boss was getting pissed I hadn't figured it out (even though it wasn't my mistake to begin with). Everything code wise looked good...and then I randomly changed a capital X to a lowercase x on some random parameter and it worked. I nearly shit myself with relief.
 
Melhisedek said:
Damn you all... Now I want to learn programing!!!
I always kinda wanted to but things got in the way...

Is it plausible to hope that I can learn some useful programing on my own. Basically threat it like a hobby (2nd to gaming).

I don't know what I want to program yet, anything sounds fun, just want to create thats all :)
Fuck Yeah would be if I could write an emulator :) (man can dream right?)

So gurus... can it be done? An hour here and there... Or should I just drop it?

In case it can be done, where to start? (I imagine you all have heard this like milion times
already)

Just to add I already have a job, lovely wife and a hyperactive year old boy, but sometimes I deprive myself from sleep like now (its 2 AM here) so perhaps I can use that time to do something creative instead of surfing web :)

Thank you for your time!
I'd recommend choosing a single specific task and using the highest-level tool or language you can reasonably use to achieve your goal. It takes a long time to get things done in programming low level code. Add learning on top of that, and it will be really tough.

It's possible, but you need good tools and modest goals.
 
I love logic and problem solving, sadly my current job has almost none of that. In any case, in this thread people awe me by saying they coded like games and mp3 players, homebrew for consoles and stuff at a very young age. I checked some tutorials and they mostly teach me to move numbers and calculate stuff.

How do you make a jump from that to coding random dungeons, emulators and such?

I can't even imagine what is it that I'm suposed to do even less how to do it :)

So please bear with me and just humor me and tell me what do I need to know in order to code a simple emulator... Lets say original Game Boy (hope it is simple) or perhaps calculator emulator. No idea just give me a rough estimate :)

Thank you for your time!
 
Melhisedek said:
I love logic and problem solving, sadly my current job has almost none of that. In any case, in this thread people awe me by saying they coded like games and mp3 players, homebrew for consoles and stuff at a very young age. I checked some tutorials and they mostly teach me to move numbers and calculate stuff.

How do you make a jump from that to coding random dungeons, emulators and such?

I can't even imagine what is it that I'm suposed to do even less how to do it :)

So please bear with me and just humor me and tell me what do I need to know in order to code a simple emulator... Lets say original Game Boy (hope it is simple) or perhaps calculator emulator. No idea just give me a rough estimate :)

Thank you for your time!

While the tutorials might seem simple they are probably teaching you the basic skills you need to do more complicated things...there are fundamental things you will have to understand to be able to do something as complicated as emulators (which is probably on the advanced side of the spectrum)...

It would be kind of like someone saying "hey I think I'm going to build a house" without learning anything about carpentry (cutting wood, nailing wood together, etc), the carpentry part is hard, sometimes boring but oh so necessary to understand and get those splinters into your hand! That's as best of an analogy as I can do, maybe it's better to take some courses at a community college ismy only other main advice otherwise your learning will not have much structure to it and you will have to be super motivated to succeed.
 
Melhisedek said:
I love logic and problem solving, sadly my current job has almost none of that. In any case, in this thread people awe me by saying they coded like games and mp3 players, homebrew for consoles and stuff at a very young age. I checked some tutorials and they mostly teach me to move numbers and calculate stuff.

How do you make a jump from that to coding random dungeons, emulators and such?

I can't even imagine what is it that I'm suposed to do even less how to do it :)

So please bear with me and just humor me and tell me what do I need to know in order to code a simple emulator... Lets say original Game Boy (hope it is simple) or perhaps calculator emulator. No idea just give me a rough estimate :)

Thank you for your time!

What the guy above me said. You need to learn step by step. Choose a programming language, something that would makes interesting outputs for you. I found C# very noob friendly since it does much work for you like creating the windows in a WYSIWYG drag and drop interface, so I'd recommend that.

And then.. grab a book and start slowly.

1. Print Hello World on screen
2. Make simple calculations
3. Let the program ask the user for numbers, calculate, and give the solution back
4. Bring your first graphic on screen
5. Make it move

etcetc. Then go from there. This is obviously the very basic beginning. Most of the time it takes me about 2 months to get to a point where I am able to program something more intricate. The Downloading program in the OP was something I did after... 2-3 weeks practice maybe. Right now I am working on that soccer league simulation thing, that is a bit more complicated and I am glad people helped me out with certain stuff, but it needed 2 months preparation before that.

And dont give up when you try a tutorial and you dont understand it, finding the right way to teach someone is just as important as the content you want to learn. Some tutorials just dont work for me, maybe because of the language the writer is using or for whatever reason.

Here are some great tutorials that worked for me pretty well:

http://msdn.microsoft.com/en-us/beginner/dd435692.aspx
http://www.freewebs.com/campelmxna/tutorials.htm

If you think you get the hang of it, I'll really recommend buying a book for this stuff. I got recommended "Code Complete 2nd Edition", which is supposed to teach important ways of structuring and things you need to be aware of while programming. Other than that, try to get a high rated programming book of Amazon to look stuff up. I used my book a lot to look stuff up, despite having online tutorials. Its also less distracting to have a print material. so that I can have Visual Studio open all the time.
 
I solved it in another way, but just so if I need it ever again:

How do I copy a List? I assume I am talking about deepcopying, please correct me if I am wrong.

List B = List A , doesnt work as they will continue to reference each other. I obviously want to copy a list before changes are being made so that I will be able to access List B BEFORE changes were being made while working on List A.

And another question regarding that:

What use would it be to use "List B = List A" anyway? They just keep referencing each other, meaning you could just keep using List A and it would have the same effect. I mean if that "=" is useless in how they use it, they could just have programmed it to deepcopy the original list.
 
What language? There might be a clone method you could use to clone the list that will take care of everything for you. Otherwise you are going to want to iterate over every element in the list and clone the elements.

Look up the difference between shallow copy and deep copy. Common pitfall for people new to programming.

Edit: sorry, missed your comments. Yes you are looking to create a deep copy of the list. 6am so give me a little bit of a break :p
 
Just wrote a Final Fantasy style dialogue system with the cascading text in about 10 minutes in C++. Always wanted to do this since I first learned programming now I finally got a project that required it.
 
Toma, C#, right?

The = operator doesn't just work on Lists in a specific manner; rather, it just happens to also work on Lists like it does everywhere else. In that regard, the described behavior is to be expected. (Especially if you consider that the = operator cannot be overloaded in C#)

If you're absolutely sure you have to clone a collection along with all its data, then there are multiple ways to go about it.

From an object-oriented programmer's point of view, I'd probably build a factory method that returns a new instance of an element's type that holds the identical data, then write an extension that uses said factory method on each element in your source list, and puts each result of the factory method into your newly-built result list, then returns that at the end. Or something.

From a hacker's point of view, I'd assure shit's [Serializable()] and implements ISerialize; then I'd binary-serialize into a memory stream, then deserialize into a null object. That might be a hack, but it's a rather good one.
 
Melhisedek said:
I love logic and problem solving, sadly my current job has almost none of that.

Nice; how about some assistance on this question....

What are the differences between an automata and Markov models? How are they similar?
 
Status
Not open for further replies.
Top Bottom