Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ErIog
Jul 11, 2001

:nsacloud:
drgn.txt is a coding masterpiece. It's one of the few examples of like truly outsider art in programming, and I have mad respect for that dude smashing forward to his goal while knowing his code is garbage. Then he actually took advice, implemented it, and the poo poo has been greenlighted on Steam. I'd love to have half the ambition and work ethic that guy has.

Every time someone makes a Kickstarter that's like, "my dream is to make games, we need money to hire a programmer" someone should link them to the White Dragon saga. It shows how if you're willing to work hard, even if you're not technically proficient, you can actually get real results. He's my god drat hero.

I've written a bunch of poo poo code, but never poo poo code that was that loving ambitious and actually worked.

Adbot
ADBOT LOVES YOU

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Dessert Rose posted:

I had no idea how to store an arbitrary number of things somewhere. Like, I knew what arrays were, and I knew what objects were, I just didn't know how you made an array of dynamic size at runtime.

Then someone showed me linked lists and it blew my mind.

I wrote a reasonably complex online game in mIRC script, before it had hash tables. I was dynamically composing variable names and storing all my player data in .ini files.

I wish I still had the files for that game, it would probably be a magical experience.

I cut my chops in programming with TI-BASIC on the TI-83. You had about 30 easily accessible variables (A-Z, theta, etc.) and some statistical variables that were a bit more annoying to get to, 10 strings (Str0-Str9), and 6 lists of maximum size 999. Oh, also these variables were global to the whole calculator, so they stuck around when you stopped and started your program. Control flow was goto based and there were no functions. The best you could do was load information into some global variables, start execution of another program, and extract information from another global variable. It took a lot of time to unlearn all the terrible practices I picked up from programming calculators all through high school.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
You also had some images that you could store 6144 bits of data in.

ExcessBLarg!
Sep 1, 2001
C was the first language I had learned after programming in Applesoft BASIC (with a bit of 6502 machine language). I had my "holy poo poo" moment after leaning about function pointers.

These days dynamic dispatch is taught early, often in the context of C++/Java-style polymorphism or Python/Ruby-style duck typing. But at the time, such a subtlety powerful mechanism built manually from primitive function pointers was absolutely incredible, and changed the way I thought about programming entirely.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Wow, it's like the bizarro-world, good version of Matthew N. Brown

Pollyanna
Mar 5, 2005

Milk's on them.


What was it that caused all the memory issues, in the end?

Tasgall
Dec 13, 2012

ErIog posted:

...and the poo poo has been greenlighted on Steam.

Wait, really? What was the game called? I didn't see the name mentioned in the archive.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Tasgall posted:

Wait, really? What was the game called? I didn't see the name mentioned in the archive.
dʒrægɛn: A Game About a Dragon

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Bognar posted:

I cut my chops in programming with TI-BASIC on the TI-83. You had about 30 easily accessible variables (A-Z, theta, etc.) and some statistical variables that were a bit more annoying to get to, 10 strings (Str0-Str9), and 6 lists of maximum size 999. Oh, also these variables were global to the whole calculator, so they stuck around when you stopped and started your program. Control flow was goto based and there were no functions. The best you could do was load information into some global variables, start execution of another program, and extract information from another global variable. It took a lot of time to unlearn all the terrible practices I picked up from programming calculators all through high school.

During Calc-1 in high school I wrote a dragon-warrior style RPG that was so large it filled the entire space of the TI-83+'s memory for basic programs.

Space Kablooey
May 6, 2009


Pollyanna posted:

What was it that caused all the memory issues, in the end?

It was the re-loading of all of his textures and sprites every frame.

FlapYoJacks
Feb 12, 2009
My first programming foray was the Linux kernel version 2.6.32-17. :v: My boss at the time hires me to teach my friend Linux and get a project up and running.

3 years later I was programming low level kernel board startup code. My former boss is a old school c programmer that taught me object oriented C programming.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy

Bruegels Fuckbooks posted:

During Calc-1 in high school I wrote a dragon-warrior style RPG that was so large it filled the entire space of the TI-83+'s memory for basic programs.

Are you me? A friend and I did something very similar in high school. Different maps, random encounters, spells, etc. We ended up learning z80 assembly and writing a lot of the heavy processing things in that (like drawing to the screen), as well as using it for accessing archived memory so all you needed to run the game was a small loader program.

Meat Beat Agent
Aug 5, 2007

felonious assault with a sproinging boner

Suspicious Dish posted:

Wow, it's like the bizarro-world, good version of Matthew N. Brown

Check out my new Steam Greenlight game "Freaky Bwalls 2: Electric Switcheroo"

Sebbe
Feb 29, 2004

So, how do you generate a neverending stream of as in unix? Well, I just came across this solution.

code:
cat /dev/urandom | tr -dc 'a'
Yes. That does in fact generate a bunch of random data, only to throw everything that isn't an a away.

Karate Bastard
Jul 31, 2007

Soiled Meat
I heard urandom is pretty shoddy quality and should be avoided.

code:
cat /dev/random | tr -dc 'a'
There. Bam. Fixed it.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
yes has my favourite man page summary ever.

apseudonym
Feb 25, 2011

Sebbe posted:

So, how do you generate a neverending stream of as in unix? Well, I just came across this solution.

code:
cat /dev/urandom | tr -dc 'a'
Yes. That does in fact generate a bunch of random data, only to throw everything that isn't an a away.

Seems technically correct to me.

Karate Bastard
Jul 31, 2007

Soiled Meat

pokeyman posted:

yes has my favourite man page summary ever.

Its --help option is almost offensively unhelpful however. It does produce a lot of help, but ain't nobody got time for reading all that.

Karate Bastard fucked around with this message at 08:28 on Feb 27, 2015

VikingofRock
Aug 24, 2008




pokeyman posted:

yes has my favourite man page summary ever.

For those of you using linux instead of BSD, here it is.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

VikingofRock posted:

For those of you using linux instead of BSD, here it is.

Another blow for coreutils.

evensevenone
May 12, 2001
Glass is a solid.

Sebbe posted:

So, how do you generate a neverending stream of as in unix? Well, I just came across this solution.

code:
cat /dev/urandom | tr -dc 'a'
Yes. That does in fact generate a bunch of random data, only to throw everything that isn't an a away.

clearly the better solution is
code:
cat /dev/zero | tr "\0" "a"

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I don't know if I'm the horror, or my co-worker is the horror. He made a string in .NET called title. Turns out that title is also a reserved term, for the HTML title of the page. So I was messing with his title, but when it's undefined as a variable it actually ends up being the page Title tag.

csammis
Aug 26, 2003

Mental Institution

Karate Bastard posted:

Its --help option is almost offensively unhelpful however. It does produce a lot of help, but ain't nobody got time for reading all that.

Please enjoy your Friday knowing that I opened up a terminal to find out what yes --help printed :haw:

KaneTW
Dec 2, 2011

code:
yes help i'm stuck in the computer

Edison was a dick
Apr 3, 2010

direct current :roboluv: only

KaneTW posted:

code:
yes help i'm stuck in the computer

:( The GNU version is helpful rather than amusing.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
Reading further into the textbook I was posting about earlier, it definitely presents the material in a really digestible way if you can ignore all the nerdy writing style.

However, this section header is certainly a horror in a different way:

Operating Systems: Three Easy Pieces posted:

The Final Producer/Consumer Solution

:godwin:

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

KaneTW posted:

code:
yes help i'm stuck in the computer
code:
yes Penus | tr '\n' ' '

Master_Odin
Apr 15, 2010

My spear never misses its mark...

ladies
Nice 2,500 line file with ~25 comments.

My favorite part:
code:
  //  /*
  ... some code ...
  //  */
Same file has a couple "// comment line!" comments too.

:aaaaa:

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Master_Odin posted:

Same file has a couple "// comment line!" comments too.

:aaaaa:

//TODO: Comment this line

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that
I do the //* //*/ thing all the time when I'm prototyping stuff. Not sure what the issue is.

JawnV6
Jul 4, 2004

So hot ...

Pavlov posted:

when I'm prototyping stuff

There's supposedly a giant brick wall between that and what's checked-in and visible to others? Idk, I've never seen one myself.

tyrelhill
Jul 30, 2006

Che Delilas posted:

//TODO: Comment this line

// TODO: Autogenerated stub.

With implementation right under it...

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

tyrelhill posted:

// TODO: Autogenerated stub.

With implementation right under it...

// 1997-11-14:
// CHANGE ASAP

Fullets
Feb 5, 2009
// TODO delete this

scala posted:

/**** This implementation to merge parents was checked in in commented-out
form and has languished unaltered for five years. I think we should
use it or lose it.

The comment was committed three years ago.

ErIog
Jul 11, 2001

:nsacloud:

carry on then posted:

// 1997-11-14:
// CHANGE ASAP

Found another one.

code:
//2001-11-09:
//CHANGE ASAP
public bool CanMeltSteelBeams(Material material) {
     if(material == Material.JetFuel) {
          return false;
     }
     return true;
}
Log(CanMeltSteelBeams(bubblegum).ToString());
--> True

ErIog fucked around with this message at 13:20 on Mar 3, 2015

Polio Vax Scene
Apr 5, 2009



Recently I found out visual studio automatically adds // HACK to your Task list.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
code:
shared_ptr<classX> p = ref ? def.x.thing1 : def.y.thing1;
const float f = ref ? def.x.thing2 : def.x.thing2;
const classY y = ref ? def.x.thing3 : def.y.thing3;
In code from 2012

Maybe I should suggest doing some static code analysis...

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

carry on then posted:

// 1997-11-14:
// CHANGE ASAP

I've found very old code with //BUG BUG BUG scattered throughout

Dicky B
Mar 23, 2004

At the top of an uncommented cmake file which defines macros for generating a bunch of cpp files from a directory of xml inputs

code:
# haha good luck

Adbot
ADBOT LOVES YOU

ijustam
Jun 20, 2005

don't remove it because then your name is last on the commit log and you're the sucker who has to fix it when it breaks

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply