Jump to content
IGNORED

Programming


zlemflolia

Recommended Posts

  • Replies 467
  • Created
  • Last Reply

I just learnt about class inheritance and super(), so now I can structure things like:

class1(object)
    __init__(self, kip=1):
        self.kip = kip

class2(class1)
    __init__(self, kip, haan=2)
        self.haan = haan
        super(class2, self).__init__(kip)
which seems super handy
Link to comment
Share on other sites

The less you debug the better.

 

lol not sure about that :cat:

 

with some fun simpleton thing maybe, but the project i'm working on right now, i would have thrown the computer out tha fuckn window multiple times without a nice debugger.

 

i mean, i applaud people who churn out code in a simple text editor, but i prefer the assistance of an IDE.

for me that's Xcode, which has improved so much over the last few years.. still somewhat crappy in many ways, but the LLVM is pretty good it seems, and the debugger inspectors are fucking awesome!

Link to comment
Share on other sites

A debugger makes life so much easier when you have to find out where the problem is. Like adding watches to variables, seeing what's inside data structures, how the code branches, etc.

 

I was once in a project writing embedded sw and when problems appeared I had to add trace prints to the code, recompile the whole thing (about 10-15 mins), flash the binaries (couple of minutes), take logs and try to understand from traces where the problem was. Then do the whole thing over again several times to pinpoint the problem. Very painful. I really started to appreciate the debuggers.

 

Then in some cases when the going got tough enough I had to dig out an oscilloscope and a logic analyzer and watch the data lines in real time to see what's actually happening in the hw..

Link to comment
Share on other sites

Is there any reason a break statement in Python would break out of an if statement and not break out of a while loop? Like:

 

while True:

if condition:

break

dostuff()

 

and dostuff still happens. This is happening to me.

Link to comment
Share on other sites

while True:

artistName = input("What artist will this be for? (press enter to return to previous menu): ")
if artistName == "":
print("why")
break
print("omg")

 

morestuff()

 

This only prints "why", and morestuff() still happens.

 

edit:

and yeah, i know this is not a very professional way of coding, but w/e, I'm just doing scripting right now anyway

 

edit:

wait, got it. ignore this.

Link to comment
Share on other sites

recompile the whole thing (about 10-15 mins), flash the binaries (couple of minutes), take logs and try to understand from traces where the problem was.

 

this is the worst! if the debug-compile-run-rinse-repeat loop gets longwinded and tedious, i tend to get super pissed.... never had to deal with such long compile times.. respect for pulling through that.

Link to comment
Share on other sites

question:

 

i know i'm just a beginner in programming but when it's going to be ok for me to buy this watch? how to know it's the right time for this big step?

 

ca53w-1_large.jpg

Link to comment
Share on other sites

question:

 

i know i'm just a beginner in programming but when it's going to be ok for me to buy this watch? how to know it's the right time for this big step?

 

ca53w-1_large.jpg

When you're sean booth

Link to comment
Share on other sites

 

question:

 

i know i'm just a beginner in programming but when it's going to be ok for me to buy this watch? how to know it's the right time for this big step?

 

ca53w-1_large.jpg

When you're sean booth

 

 

he's not wearing this model. i mean, where u live?

Link to comment
Share on other sites

  • 2 weeks later...
Guest disparaissant

anyone know a good, simple, beginner's resource to starting to learn C or C++?


like the extent of my programming experience is basically dicking around in QBASIC/BASICA when i was a kid. and a little bit of bash scripting. but that's the extent of it.

Link to comment
Share on other sites

These languages are not exactly designed to be beginner friendly so good luck...

is this for a project you wanna do or just because?

 

It'll take some time & effort till you can make anything that's not totally boring/trivial.

IMO start with something that has a C-like syntax but let's you work creatively from the start.

try processing.org

Visual feedback FTW!

Link to comment
Share on other sites

If you want to start with processing in a good way, I really recommend his book Learning Processing. I didn't liked those hour of code tutorials. You can learn exactly the same in just 2 minutes with the book.


also, just buy/download books if you want to learn any language, really.

Link to comment
Share on other sites

Guest disparaissant

thanks!

i'm just trying to learn stuff for fun. figure i'll give it a go. if i learn something good, great! if not, oh well. i wasted a winter break trying to learn something.

so far the most engaging thing i've found is a book about learning c++ for game programming.

i'm not totally interested in game programming, but i figure it will give me the most interesting demonstration programs.

Link to comment
Share on other sites

These languages are not exactly designed to be beginner friendly so good luck

Python is though. Starting with Python isn't a bad idea. Of course, if you start with something harder, like C++, everything else will be easy. I also like Java as a language, but the JVM thing sucks.

Link to comment
Share on other sites

 

These languages are not exactly designed to be beginner friendly so good luck

Python is though. Starting with Python isn't a bad idea. Of course, if you start with something harder, like C++, everything else will be easy. I also like Java as a language, but the JVM thing sucks.

 

 

but if you fall flat on your face after a few hours with C++ it might well spoil the fun..

i for one would never have started if it wasn't for Processing & a procedural illustration class in design school...

 

programming will never be "easy" imo.. if it's like hobby/recreational, definitely better to start off with something which gets you up and running immediately, rather than fighting with libraries, compilers, pointers, how-do-i-make-a-fucking-window-to-draw-in-and-what-the-hell-is-a-vertex-buffer-object and such, so that you run for the hills after a few days.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.