Speaking of Python, I was commenting to a friend the other day that I was kind of surprised how slow the uptake of Python 3 has been. Python 3 was released in 2008, yet everyone I know is still using 2.6/2.7.
The change to the default behaviour of divide in python to always return a float value pissed me off greatly, and I expect it did the same for numerous other developers.
Why would that bother you? You can floor/ceil/round it if you want a flat integer, and since Python is dynamically typed, it seems more logical to return the most complex type possible and go down from there.
Speaking of Python, I was commenting to a friend the other day that I was kind of surprised how slow the uptake of Python 3 has been. Python 3 was released in 2008, yet everyone I know is still using 2.6/2.7.
The change to the default behaviour of divide in python to always return a float value pissed me off greatly, and I expect it did the same for numerous other developers.
Why would that bother you? You can floor/ceil/round it if you want a flat integer, and since Python is dynamically typed, it seems more logical to return the most complex type possible and go down from there.
Rounding a float back to an int is a different operation from integer division, it is a real concern.
Infidel on
0
Options
GnomeTankWhat the what?Portland, OregonRegistered Userregular
edited March 2011
*shrugs* It's never an issue I've run in to, but I'm not gonna sit and say it's not a concern for people. The interpreted language I use the most is Lua, where there are no integers, everythign is effectively a float, so I guess it's just something I'm used to.
Yeah the only thing that really sticks out to me is a few name changes and syntax uniformity. I'd be pretty hesitant to convert all my existing code to 3.0. Of course that's a double edged sword because then I'd probably never upgrade my interpreter to 3.0 and all my new code would be 2.7 as well.
It basically surmounts to rewriting my code to accommodate the changes. Though that was a skim so I probably glossed over some deeper changes.
The way Python 3 handles Unicode has completely changed. It is the fundamental difference between 2 and 3 and it's one the the Python community grappled with for ages - seriously like a year of time just dedicated to how to encode strings. And it's one of those things where (if like me) you don't even think about Unicode at all in your day to day programming it makes not one jot of difference but (apparently) if you deal with Unicode as a matter of course the changes are wide ranging and highly significant.
As for upgrading/not upgrading code I think the idea is that you don't bother upgrading existing projects as Python is designed to have multiple interpreters and libraries sitting side by side without issues so there's no point in going through the pain if you don't have to.
What Actionscript 3 things are you finding WTF worthy (there's plenty of them - I'm just making sure you expend you energy to one's tht are worthwhile otherwise you might suffer WTF fatigue)?
I'm not sure anymore, lol. Some of the shit i'm like "ok, that code is stupid, but it makese sense in an "Adobe" kind of way, and it would be 20 more lines to make that work in HTML.
But shit Math.random() and Math.floor.
Does simple shit like this need to be overly complicated? Can't I just have Random.number(peram,peram);
I realize i'm new to the language and this probably nothing, but... I mean.. come on.
You can always 5//2 if you want 2 as the answer rather than 2.5 in 3.0. DYSWIDT?
Updating tens or even hundreds of thousands lines of python code across numerous projects to use // instead of / is a horrible job since python has operator overloading and dynamic typing.
The other option is set the divide mode on every file to be legacy.
Does nokia get a kickback everytime you mention Qt ethea?
I kid, but xcode is pretty nice!
Qt has been transferred to Digia, due to recent business deals between Nokia and Microsoft.
Sort of expected, to be honest.
That is so wrong. The transfered the ownership of the closed source copyright licenses to Digia, not the GPL or LGPL ownerships. Nokia is still doing Qt development, they just aren't selling commercial licenses of Qt or doing commercial support.
I'm not sure anymore, lol. Some of the shit i'm like "ok, that code is stupid, but it makese sense in an "Adobe" kind of way, and it would be 20 more lines to make that work in HTML.
But shit Math.random() and Math.floor.
Does simple shit like this need to be overly complicated? Can't I just have Random.number(peram,peram);
I realize i'm new to the language and this probably nothing, but... I mean.. come on.
That's just lazy library provision on Adobe's part rather than the language, any languages who's library is providing a Random.number(peram,peram) like functionality is going to be implementing it by calling a Random.random() and multiplying it by the range adding the start value and flooring the result.
No the real WTFS is you can do this
function foo():void
{
x.length()
var x:String = "dfgdgf"
}
And the compiler won't pick that up. you have to wait till run-time for that to throw a null-pointer exception.
Well, they may be automatically moving all variable declarations to the beginning of the block they are defined in. Or to the point they are first used
Well, they may be automatically moving all variable declarations to the beginning of the block they are defined in. Or to the point they are first used
That's still horrible. Now rather than giving the programmer a statically analyzed compile time error for a very obvious mistake, you've made him wait to actually test it, and then thrown a run-time error.
Yeah the only thing that really sticks out to me is a few name changes and syntax uniformity. I'd be pretty hesitant to convert all my existing code to 3.0. Of course that's a double edged sword because then I'd probably never upgrade my interpreter to 3.0 and all my new code would be 2.7 as well.
It basically surmounts to rewriting my code to accommodate the changes.
Some changes can be automatically made with 2to3. You can run the 2.7 (and I believe the 2.6) interpreters with the -3 flag to get warnings about things that 2to3 can't automatically fix (and if you haven't ran 2to3 on your code, probably all the other incompatibilities).
As for me, I'm still on 2.7 due to libraries I use that haven't ported to Python 3 by their authors. I'm using the 3.x features that were backported in my code, and I'm using the __future__ imports for things like division, unicode literals, and the print function.
Barrakketh on
Rollers are red, chargers are blue....omae wa mou shindeiru
How important is it, in your opinion, to know design patterns? Is most of what you do based on an existing design pattern?
You'll use design patterns all the time in professional programming, consciously or not.
Whether you are a good developer has less to do with your coding ability in relation to your ability to communicate effectively.
Knowing design patterns greatly helps your ability to communicate code and design.
You want to know your design patterns because you don't want to be a code monkey that can be outsourced, or the "well he is smart but he just can't work well in our environment" guy that gets canned.
Quick bitch-fest: Xcode 4 was released today. Apple can go take a hike though. Xcode now costs money. You either have to enroll in the iOS Developer Program ($99), the Mac Developer Program ($99) or you can buy Xcode on the App Store ($5). $5 isn't a big deal at all, but why all the sudden start charging for Xcode? Let me guess: Sarbanes–Oxley?
Well it seems like they've thrown a lot more developer resources at Xcode 4 than previous releases. New compiler infrastructure, new debugger, new interface. It's practically a top to bottom re-write. That probably cost them a lot in man-hours of development.
And $5 is what, a sandwich? The first compiler I used back in the day cost my dad $149, and wasn't a tenth of a modern IDE.
I'm not sure anymore, lol. Some of the shit i'm like "ok, that code is stupid, but it makese sense in an "Adobe" kind of way, and it would be 20 more lines to make that work in HTML.
But shit Math.random() and Math.floor.
Does simple shit like this need to be overly complicated? Can't I just have Random.number(peram,peram);
I realize i'm new to the language and this probably nothing, but... I mean.. come on.
That's just lazy library provision on Adobe's part rather than the language, any languages who's library is providing a Random.number(peram,peram) like functionality is going to be implementing it by calling a Random.random() and multiplying it by the rand adding the start value and flooring the result.
No the real WTFS is you can do this
function foo():void
{
x.length()
var x:String = "dfgdgf"
}
And the compiler won't pick that up. you have to wait till run-time for that to throw a null-pointer exception.
That's because the "compiler" doesn't compile Actionscript. At best it just minifies it. That's why it's so stupidly easy to steal Flash files. Actionscript's runtime is more analogous to Javascript than C#. Any reference to a compiler in all those fancy devnet slideshows is referring to the runtime compilation done by the AVM.
"Publish Movie" is just a glorified JPEG packer.
Adobe calls the error screen "compiler warnings", because most people who use Flash are stupid and don't know the difference. Really it's just Syntax Checker 2.0 and a very light helping of static analysis to make sure your class declarations aren't completely fucked.
How important is it, in your opinion, to know design patterns? Is most of what you do based on an existing design pattern?
You'll use design patterns all the time in professional programming, consciously or not.
Whether you are a good developer has less to do with your coding ability in relation to your ability to communicate effectively.
Knowing design patterns greatly helps your ability to communicate code and design.
You want to know your design patterns because you don't want to be a code monkey that can be outsourced, or the "well he is smart but he just can't work well in our environment" guy that gets canned.
Does the urge to commit unspeakable horrors on the team member who didn't write the critical piece of debugging code assigned to him for our big quarter project until the very moment I sat down in desperation to write it myself, and then proceeded to take nearly 6 hours to nudge the stub I gave them into a half-working copy, thereby making the rest of us stay up until 4am debugging, does this uncharacteristic violent tendency count as not working well with others?
Do any of you use and prefer an alternate typing layout to QWERTY? Just curious.
I really wish I had been taught Dvorak, but I'm already committed to Qwerty, there's not really any sense going back now and relearning how to type in exchange for maybe 10wpm when most of my time programming is spent trying to debug or read library specs or something.
Monkey Ball Warrior on
"I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
Do any of you use and prefer an alternate typing layout to QWERTY? Just curious.
I swear by dvorak for left-handed folks. Between that, and better typing posture obviously, my hands no longer scream at the end of the day.
The biggest boost to improving my typing comfort though has been re-binding capslock. I do nearly all of my editing in emacs, and rebinding caps locks to control has made my life measurably better.
dvorak is a thing, but a competent QWERTY typist will outperform even the most mediocre of dvorak typist. Muscle memory is more powerful than location of the letters. If I was speed typing I could probably, realistically, match a dvorak typist in wpm.
bowen on
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
dvorak is a thing, but a competent QWERTY typist will outperform even the most mediocre of dvorak typist. Muscle memory is more powerful than location of the letters. If I was speed typing I could probably, realistically, match a dvorak typist in wpm.
I figured that would be the case. I've heard dvorak is good for programming, but I just don't think it would be worth the time and effort, especially on top of learning C.
dvorak is a thing, but a competent QWERTY typist will outperform even the most mediocre of dvorak typist. Muscle memory is more powerful than location of the letters. If I was speed typing I could probably, realistically, match a dvorak typist in wpm.
I figured that would be the case. I've heard dvorak is good for programming, but I just don't think it would be worth the time and effort, especially on top of learning C.
Thanks.
It's really not a speed thing, it's for comfort / health. Most of the problems I fixed by swapping to dvorak could have been fixed by having a better keyboard tray that inclined the thing so my hands were in the right position, or by typing with the keyboard in my lap.
dvorak is a thing, but a competent QWERTY typist will outperform even the most mediocre of dvorak typist. Muscle memory is more powerful than location of the letters. If I was speed typing I could probably, realistically, match a dvorak typist in wpm.
I figured that would be the case. I've heard dvorak is good for programming, but I just don't think it would be worth the time and effort, especially on top of learning C.
Thanks.
Classic dvorak doesn't really offer great increases to C style programmers since the majority of the special characters haven't moved. Programmer dvorak was designed to make coding easier.
How important is it, in your opinion, to know design patterns? Is most of what you do based on an existing design pattern?
You'll use design patterns all the time in professional programming, consciously or not.
Whether you are a good developer has less to do with your coding ability in relation to your ability to communicate effectively.
Knowing design patterns greatly helps your ability to communicate code and design.
You want to know your design patterns because you don't want to be a code monkey that can be outsourced, or the "well he is smart but he just can't work well in our environment" guy that gets canned.
This is very true. I'm finishing up a certificate in school this semester and then am looking to get a proper CS degree for this reason and am also picking up various books that cover a lot of that stuff.
I'm very good at what I do, as far as I can tell. I've never had a complaint about my code, but have had multiple managers and people who have interviewed me that actually looked at my code samples say I was one of the best they had worked with/interviewed (honestly, I think I'm good, but it's a bit scary if I'm one of the best they've seen as I think the best thing about my code is usually that it's clear and simple). That doesn't always come through in interviews because I don't always have the language or terminology to match my actual ability and so sometimes sound like I don't know wtf I'm doing. It's hurt me in several interviews for jobs I was perfectly capable of doing.
Ergonomics will have a greater impact than qwerty/dvorak. Not saying there is nothing to be gained but it's well overshadowed by other changes you could make.
I'm in the camp that figures the minimal gain after retraining to dvorak would be pretty meh, especially when you consider that I have to switch to typing on other keyboards or have someone else maybe typing at mine. That would be a nice o_O moment for them.
Posts
Qt has been transferred to Digia, due to recent business deals between Nokia and Microsoft.
Sort of expected, to be honest.
Why would that bother you? You can floor/ceil/round it if you want a flat integer, and since Python is dynamically typed, it seems more logical to return the most complex type possible and go down from there.
Rounding a float back to an int is a different operation from integer division, it is a real concern.
I made a game, it has penguins in it. It's pay what you like on Gumroad.
Currently Ebaying Nothing at all but I might do in the future.
Flash.
Actionscript 3.0
WTF Adobe?
The way Python 3 handles Unicode has completely changed. It is the fundamental difference between 2 and 3 and it's one the the Python community grappled with for ages - seriously like a year of time just dedicated to how to encode strings. And it's one of those things where (if like me) you don't even think about Unicode at all in your day to day programming it makes not one jot of difference but (apparently) if you deal with Unicode as a matter of course the changes are wide ranging and highly significant.
As for upgrading/not upgrading code I think the idea is that you don't bother upgrading existing projects as Python is designed to have multiple interpreters and libraries sitting side by side without issues so there's no point in going through the pain if you don't have to.
I made a game, it has penguins in it. It's pay what you like on Gumroad.
Currently Ebaying Nothing at all but I might do in the future.
What Actionscript 3 things are you finding WTF worthy (there's plenty of them - I'm just making sure you expend you energy to one's tht are worthwhile otherwise you might suffer WTF fatigue)?
I made a game, it has penguins in it. It's pay what you like on Gumroad.
Currently Ebaying Nothing at all but I might do in the future.
ahahahahahahahahahahahahaha, no.
But shit Math.random() and Math.floor.
Does simple shit like this need to be overly complicated? Can't I just have Random.number(peram,peram);
I realize i'm new to the language and this probably nothing, but... I mean.. come on.
Yeah I know I was being facetious. I'm pretty positive I'm going to have to pay $99 for the shit anyways.
Updating tens or even hundreds of thousands lines of python code across numerous projects to use // instead of / is a horrible job since python has operator overloading and dynamic typing.
The other option is set the divide mode on every file to be legacy.
That is so wrong. The transfered the ownership of the closed source copyright licenses to Digia, not the GPL or LGPL ownerships. Nokia is still doing Qt development, they just aren't selling commercial licenses of Qt or doing commercial support.
That's just lazy library provision on Adobe's part rather than the language, any languages who's library is providing a Random.number(peram,peram) like functionality is going to be implementing it by calling a Random.random() and multiplying it by the range adding the start value and flooring the result.
No the real WTFS is you can do this
And the compiler won't pick that up. you have to wait till run-time for that to throw a null-pointer exception.
I made a game, it has penguins in it. It's pay what you like on Gumroad.
Currently Ebaying Nothing at all but I might do in the future.
Who wrote their compiler, a chimp?
That's still horrible. Now rather than giving the programmer a statically analyzed compile time error for a very obvious mistake, you've made him wait to actually test it, and then thrown a run-time error.
I keep thinking about enrolling, but I need to get a lot better with Obj-C first.
I work with code that uses.
Factory
Singleton
Proxy
Adapter
Decorator
Interpreter
Iterator
MCV
Also use others but can't remember or we don't follow the correct names.
As for me, I'm still on 2.7 due to libraries I use that haven't ported to Python 3 by their authors. I'm using the 3.x features that were backported in my code, and I'm using the __future__ imports for things like division, unicode literals, and the print function.
You'll use design patterns all the time in professional programming, consciously or not.
Whether you are a good developer has less to do with your coding ability in relation to your ability to communicate effectively.
Knowing design patterns greatly helps your ability to communicate code and design.
You want to know your design patterns because you don't want to be a code monkey that can be outsourced, or the "well he is smart but he just can't work well in our environment" guy that gets canned.
Well it seems like they've thrown a lot more developer resources at Xcode 4 than previous releases. New compiler infrastructure, new debugger, new interface. It's practically a top to bottom re-write. That probably cost them a lot in man-hours of development.
And $5 is what, a sandwich? The first compiler I used back in the day cost my dad $149, and wasn't a tenth of a modern IDE.
That's because the "compiler" doesn't compile Actionscript. At best it just minifies it. That's why it's so stupidly easy to steal Flash files. Actionscript's runtime is more analogous to Javascript than C#. Any reference to a compiler in all those fancy devnet slideshows is referring to the runtime compilation done by the AVM.
"Publish Movie" is just a glorified JPEG packer.
Adobe calls the error screen "compiler warnings", because most people who use Flash are stupid and don't know the difference. Really it's just Syntax Checker 2.0 and a very light helping of static analysis to make sure your class declarations aren't completely fucked.
Does the urge to commit unspeakable horrors on the team member who didn't write the critical piece of debugging code assigned to him for our big quarter project until the very moment I sat down in desperation to write it myself, and then proceeded to take nearly 6 hours to nudge the stub I gave them into a half-working copy, thereby making the rest of us stay up until 4am debugging, does this uncharacteristic violent tendency count as not working well with others?
I really wish I had been taught Dvorak, but I'm already committed to Qwerty, there's not really any sense going back now and relearning how to type in exchange for maybe 10wpm when most of my time programming is spent trying to debug or read library specs or something.
I swear by dvorak for left-handed folks. Between that, and better typing posture obviously, my hands no longer scream at the end of the day.
The biggest boost to improving my typing comfort though has been re-binding capslock. I do nearly all of my editing in emacs, and rebinding caps locks to control has made my life measurably better.
I figured that would be the case. I've heard dvorak is good for programming, but I just don't think it would be worth the time and effort, especially on top of learning C.
Thanks.
It's really not a speed thing, it's for comfort / health. Most of the problems I fixed by swapping to dvorak could have been fixed by having a better keyboard tray that inclined the thing so my hands were in the right position, or by typing with the keyboard in my lap.
Classic dvorak doesn't really offer great increases to C style programmers since the majority of the special characters haven't moved. Programmer dvorak was designed to make coding easier.
I'm very good at what I do, as far as I can tell. I've never had a complaint about my code, but have had multiple managers and people who have interviewed me that actually looked at my code samples say I was one of the best they had worked with/interviewed (honestly, I think I'm good, but it's a bit scary if I'm one of the best they've seen as I think the best thing about my code is usually that it's clear and simple). That doesn't always come through in interviews because I don't always have the language or terminology to match my actual ability and so sometimes sound like I don't know wtf I'm doing. It's hurt me in several interviews for jobs I was perfectly capable of doing.
I'm in the camp that figures the minimal gain after retraining to dvorak would be pretty meh, especially when you consider that I have to switch to typing on other keyboards or have someone else maybe typing at mine. That would be a nice o_O moment for them.
I'll get back to you in 15 years.