Jump to content

Recommended Posts

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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101781
Share on other sites

  On 12/8/2013 at 5:03 PM, Joseph said:

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!

Edited by Guest
Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101784
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..

electro mini-album Megacity Rainfall
"cacas in igne, heus"  - Emperor Nero, AD 64

Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101789
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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101796
Share on other sites

Are you certain that your condition is true? break only breaks out of the smallest enclosing while or for loop.

electro mini-album Megacity Rainfall
"cacas in igne, heus"  - Emperor Nero, AD 64

Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101797
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.

Edited by gmanyo
Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101798
Share on other sites

  On 12/8/2013 at 5:26 PM, mokz said:

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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101802
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

Edited by xox
Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101806
Share on other sites

  On 12/8/2013 at 6:37 PM, xox said:

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

Autechre Rule - Queen are Shite

Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101873
Share on other sites

  On 12/8/2013 at 10:06 PM, Joseph said:

 

  On 12/8/2013 at 6:37 PM, xox said:

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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2101886
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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2106914
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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2106994
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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2107126
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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2107273
Share on other sites

  On 12/21/2013 at 12:27 PM, phling said:

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
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2107276
Share on other sites

  On 12/21/2013 at 9:17 PM, phling said:

unless it's Javascript, then u only need ctrl+c & ctrl+v.

 

 

 

NO no no, ctrl+z saves lives.

Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2107442
Share on other sites

  On 12/22/2013 at 6:20 AM, gmanyo said:

 

  On 12/21/2013 at 12:27 PM, phling said:

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.

Edited by Guest
Link to comment
https://forum.watmm.com/topic/79152-programming/page/4/#findComment-2107481
Share on other sites

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×