Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 71 72 [73] 74 75 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 886442 times)

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1080 on: January 31, 2012, 11:50:43 am »

There's plenty of people in the class who already took extensive AP compsci and did lots of coding on their own, so the forums set up for the course alternate between ridiculous noobish questions and expert-types stroking their e-peens.

Oh well?
Sounds about right. However, that sort of thing does in fact serve a purpose; it allows you to determine who knows their stuff and should be sought out when advice or tips on the subject are needed as well as who's advice should be entirely ignored because they don't know what they are talking about. It's particularly important when doing more advanced things with code, like graphics programming, as you can learn it from someone who has done it before in a much shorter time period than you can teach it to yourself.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1081 on: January 31, 2012, 02:22:41 pm »

Fun Fact 1: You cannot install or repair Windows from the install disk if you don't have a partition table.
Fun Fact 2: The only OS I have on a USB key won't let you open a terminal.  It's defective.
Fun Fact 3: GParted forces you to whip the entire disk to create a partition table.
Fun Fact 4: Windows 7 takes approximately fifteen minutes to install.

And so there is finally some OS on my computer that will function.  I'll re-install Linux later this week...  I am now sans ~500GB of data.  Nearly all of which was either backed up or irrelevant.  First, get all the applications I need for academic purposes.  I'll worry about everything else later.  Tutorials to come whenever I find time.

So here's how things played out.  Windows 7 crashed.  Okay, fine.  That happens often enough.  Quick reboot and...Win7 crashes on boot consistently...um...crap.  Okay, boot into LMDE to do my homework.  Then somewhere along the line, LMDE crashes.  That's...rare.  Then it won't boot up twice.  I'm starting to get worried, but third try, it boots up.  I begin exploring why the crap Win7 won't boot and find nothing of note.  Then LMDE crashes again.  This time, I can't get it to boot.  So I try the LMDE Recovery and...it crashes during boot.  So I try the Win7 Recovery partition and...it crashes during bootup.  Okay, I seriously need to fix Windows at this point for academic reasons, namely, a lot of academic software doesn't run in WINE.  Put in my Win7 disk and...WTF!?  The machine is crashing during bootup of a disk!?  Okay, okay...I can still handle this...as of this point, I hadn't tried booting into Fedora.  I can save the machine from there!  Pull the disk and boot into the machine and...grub rescue mode comes up...apparently the Win7 disk crashing killed something.  At this point, I'm assuming it somehow fried the partition table and begin looking for ways to deal with that.  In desperation, I remember that I usually install OSs from usb key and just try every one of my keys hoping that one of them still contains a live OS.  Thankfully, I find a Mint OS that's about 350 critical updates behind, but happens to work!  Kind of.  It's replicating one of the partitions as 155 different devices.  And it's refusing to recognize external media most of the time.  With enough finagling, I can make it recognize a disk or other usb devices, but only if I don't have more than about two devices plugged in at a time.  I want to re-install grub in the hope that it can fix things.  Pull up gparted so I can see what the name of the partition that LMDE is on is.  The partitions that are supposed to contains LMDE and Fedora are both listed as Unallocated...wtf, shit, and #$*@^!!!!  How the crap do partitions experience Critical Existence Failure!?  At this point, I'm a combination of indescribably furious, rather intrigued by just how it's failing, and desperation trying to save my computer.  Okay, okay, I'm not f*ed yet.  Open up a terminal and run some deep magic and I should be able to save everything.  ...what do you mean you can't open a terminal window?  Fine.  I can do some finagling to make this work...except that the entire system is actively antagonizing me now.  I eventually resolve that I can't rescue the system and realize I was planning to re-install Win7 anyway.  Linux, on the other hand...I just kind of hoped that I didn't have any important data that wasn't backed up on that partition...most of the important data was on the really big Data partition.  I give up on that and go on an epic crusade to get another legal copy of Win7 from my university.  The download manager they force you to use only runs on Windows...  Borrow roommate's computer for awhile...repurpose an old disk to burn the image.  Realize that it's still crashing during disk boot.  So I go back into that Mint usb and use it to transfer the Win7 data to another usb.  Boot off of that.  Still crashing.  Go back into Mint and tell gparted to create a new partition table, frying any data I had left.  Format the disk as NTFS and hope that the Win7 installer can figure it out.  Pull up the Win7 installer from the usb I made and it works perfectly!  Before it was trying for half an hour then crashing or telling me it won't work.  Now it's up and running in seconds!  I realize that this probably means that the Win7 installer will just refuse to function if there isn't a partition table.  Install Win7.  Realize that the internet is running at about 5kb/s.  I then assume that it's because the generic Microsoft wlan driver that comes with Win7 retail is crap.  But I can't get online with enough speed to download the manufacturer drivers anytime this year...  I load up that old Mint usb again and download the drivers I need from there, which works fantastically well.  Install them in Win7, reboot twice, and things are looking good.  Internet is working.  Got anti-virus.  Got a decent browser.  Re-installed Java.  Started the arduous process of re-installing academic software that I need...this will take awhile...and at some point I need to rebuild my dual Win7-Linux setup.  I'll worry about Linux later...  I still really want to know caused all of this, but making the thing work so I could do school-work was more important.

And that, right there, is the story of my weekend.  I love my university for subscribing to MSDN.  It's the reason I can legally download Win7 for free.  I've never seen a computer crash and burn like this.  And this ordeal handled a severe problem for me; I no longer have to clear out space on my disk.  Now...

Perl...dang homework...who's good at Perl?

The windows install partition has special protextions
It REALLY doesn't want those protextions violated-

At all costs.
Why a Windows/linux dual boot doesn't work somehow, ect.

You break the windows partition on the very bottom layer-BAAAAAAAD.

On another note, this means you can restore your computer to a blank windows install without a disk,
Which is gooood.

If I remember correctly, It's also installed to two different partitions by default, so even if one part of the disk is corrupted, messed up, ect, a perfectly good backup exists.

A perfectly good invisible backup.

If the linux isn't booted from a windows startup, this backup is most likely visible.
Thus why you aren't allowed to do that.
« Last Edit: January 31, 2012, 02:28:38 pm by eerr »
Logged

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1082 on: January 31, 2012, 02:32:31 pm »

I have a flash drive with the windows xp install disk on it, so I can install from flash drive.
I never use my cd drive on my laptop, ever. after 3 years of not using it, I tried using it to find that it didn't work so this is the only way I can install new OS's or reformat my computer.
I also have a flash drive with ubuntu installed to it, for my home away from home.
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1083 on: January 31, 2012, 03:10:30 pm »

The thing is, the Windows install disk broke my bootup without me telling it to do anything...  Are you telling me solely putting in the disk is enough for it to fry my boot sector?  And it only exists where I put it when you aren't using the default setup.  Regardless of what happened to Windows, it shouldn't have killed grub.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1084 on: January 31, 2012, 03:21:44 pm »

I have a flash drive with the windows xp install disk on it, so I can install from flash drive.
I never use my cd drive on my laptop, ever. after 3 years of not using it, I tried using it to find that it didn't work so this is the only way I can install new OS's or reformat my computer.
I also have a flash drive with ubuntu installed to it, for my home away from home.

Thing is, you don't need a disc, and your backup copy of windows can't be violated, as long as you only boot from the hard disk. or a clean windows install.

Best security money can buy.

Quote
"Regardless of what happened to Windows, it shouldn't have killed grub."
Don't format Windows hard drives if you haven't booted from a Windows OS.

Unless you wanted to explicitly remove Windows,
 or Were willing to move around the install, clean the disk, put the install back on, wait for it to make a new backup copy, (which it will do!), all to change the partitions a bit.

Or you were that desperate to make linux dominant, in which case, congradulations, you can now fuck up the windows partition with linux.
Good job.
« Last Edit: January 31, 2012, 03:34:38 pm by eerr »
Logged

Vector

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1085 on: January 31, 2012, 06:35:55 pm »

Hmm... does anyone know how to pop a value out of a "while" loop?  There's something that's being modified in there, and I can't get it out to return after a bunch of other stuff is printed.
Logged
"The question of the usefulness of poetry arises only in periods of its decline, while in periods of its flowering, no one doubts its total uselessness." - Boris Pasternak

nonbinary/genderfluid/genderqueer renegade mathematician and mafia subforum limpet. please avoid quoting me.

pronouns: prefer neutral ones, others are fine. height: 5'3".

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1086 on: January 31, 2012, 06:40:07 pm »

You're going to have to define a variable outside of the loop and assign it the value you want returned, because any variables defined inside the loop are only accessible inside the loop.
Logged

Vector

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1087 on: January 31, 2012, 06:47:31 pm »

Yeah, there's a variable assigned outside the loop with a certain initial value.  The "while" loop increments that variable by a certain amount and also prints a bunch of crap out for people to see.  I can't seem to get the "return var" thinger to return anything when the printing happens, but it's more than happy to return the number when there's no printing happening.

EDIT: Never mind, Emacs was doing really weird things.  Sorry about that.
« Last Edit: January 31, 2012, 06:54:06 pm by Vector »
Logged
"The question of the usefulness of poetry arises only in periods of its decline, while in periods of its flowering, no one doubts its total uselessness." - Boris Pasternak

nonbinary/genderfluid/genderqueer renegade mathematician and mafia subforum limpet. please avoid quoting me.

pronouns: prefer neutral ones, others are fine. height: 5'3".

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: if self.isCoder(): post() #Programming Thread
« Reply #1088 on: February 01, 2012, 09:21:58 am »

I've never really finished any kind of game, and yet I have thousands of lines of code that could potentially be games sitting on my hard drive. It's a problem with ambition; as a programmer, I want any game I attempt to program to be worth my time. I have to be really excited for a concept to even get started on it. And even then, I end up spending my time tacking features onto extremely broad, multi-purpose engines.

"But what if my theoretical game needs a feature like this?" *codes for several hours* "Oh, but what if I need to do this?!" *codes for several more hours*

It just keeps going.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1089 on: February 01, 2012, 09:25:54 am »

I've never really finished any kind of game, and yet I have thousands of lines of code that could potentially be games sitting on my hard drive. It's a problem with ambition; as a programmer, I want any game I attempt to program to be worth my time. I have to be really excited for a concept to even get started on it. And even then, I end up spending my time tacking features onto extremely broad, multi-purpose engines.

"But what if my theoretical game needs a feature like this?" *codes for several hours* "Oh, but what if I need to do this?!" *codes for several more hours*

It just keeps going.
This.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1090 on: February 01, 2012, 10:16:13 am »

I've never really finished any kind of game, and yet I have thousands of lines of code that could potentially be games sitting on my hard drive. It's a problem with ambition; as a programmer, I want any game I attempt to program to be worth my time. I have to be really excited for a concept to even get started on it. And even then, I end up spending my time tacking features onto extremely broad, multi-purpose engines.

"But what if my theoretical game needs a feature like this?" *codes for several hours* "Oh, but what if I need to do this?!" *codes for several more hours*

It just keeps going.
That's why you need a game design document, so you can clearly see what you need. Also, may I introduce you to the concepts of YAGNI and Do the simplest thing that could possibly work
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1091 on: February 01, 2012, 10:19:34 am »

I have never been able to commit to YAGNI myself... At least not while programming games for fun. I often enjoy making functionality even if it has no value as a game construct.
Even if maps of theoretical infinite size are never seen in game because accessing the over world map is done by walking to the edge of a level map, they sure are fun to make!

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1092 on: February 01, 2012, 04:23:17 pm »

It just keeps going.
This.
This, indeed. My current attempt to overcome YAGNI is my game-design-document: It Needs Everything.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1093 on: February 01, 2012, 04:36:19 pm »

is it in bad practice to use make believe filetypes? or to invent a filetype to only use it once and never again for anything else?
for example, in my juggle game I save the highscore to the file score.fish
because I thought it was funny, and when you look at the folder with the file with explorer is says FISH file, and I thought that was silly.


well I guess I already know the answer to the question, but this is a small project so I should be able to do anything I want, right?  I mean, there aren't any "rules" against it, are there?
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #1094 on: February 01, 2012, 04:37:15 pm »

Of course its acceptable to create your own file extensions (note - not actually their own file type). Why wouldn't it be?

The extension doesn't really mean anything, it's just to make it easier for programs to differentiate.
Logged
Pages: 1 ... 71 72 [73] 74 75 ... 796