Elsewhere on the internet...

The League of Reason has some social media accounts! You can find us on Facebook or on Twitter for some interesting links and things.

Python (Programming is Fun again!)

Post new topic Reply to topic  Page 1 of 1
 [ 12 posts ] 
Python (Programming is Fun again!)
Author Message
)O( Hytegia )O(League LegendUser avatarPosts: 3135Joined: Fri Nov 13, 2009 11:27 pm Gender: Cake

Post Python (Programming is Fun again!)

I'm an old-fashioned hacker, and a typical one.
I started off as a kid with a wild-streak and a knack at numbers. That, combined with a bit of intrigue about the magic of computers, caused me to hop on it and play a bit.
I was mapping out networks and cracking WEP keys before half of the script-kiddie material they have now was even daydreamed!

But, I digress. Over the years, the fantasy had died. There is no more wonder in a raw hunk of metal, no matter how many games one has on it. C+? A+? I got those certs in my sleep. Perl? Been there, done that, and bought the T-Shirt. Minutes to hours of scripting away, myself knowing that each and every touch of the keyboard would send electrical signals down through the circuit, to be input as a series of 1s and 0s before being interpreted and sent back up to be displayed on my monitor...
Monotony.

But then, while I was browsing through my favorite XKCD comics, I came across this comic and was immediately curious. A different programming language? Worth a shot.
But Python - it is different. It is simple, and capable of playing on the same levels of complexity as the other methods. Soon I was writing complex mathematical algorithms - things that, to input, would have taken me a half hour on other languages - in MINUTES. I even managed to design myself a GUI-enhanced MineCraft counter to keep tack of various statistics (such as altitude, deaths, monsters killed, etc).

I now find myself back in amazement with computers - simply because, as the comic stated, simple programming is FUN programming!

What do you think of Python?
Some would insinuate that being drunk at 9 in the morning to be signs of serious issues.
Me? I'd insinuate it as signs of no plans and a refrigerator full of Whiskey and Guinness.
Sun Jan 09, 2011 3:02 pm
PulsarUser avatarPosts: 872Joined: Tue Feb 24, 2009 5:52 pmLocation: Belgium

Post Re: Python (Programming is Fun again!)

I absolutely love Python, you can program things in a fraction of the time required for e.g. C++. The only downside is that, since it doesn't generate compiled code, it can't be used for high-performance algorithms. Other than that, it's fantastic. You're right, it does make programming fun again. I think it should be taught to students as their first computer language.
I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey

Science doesn’t know everything … religion doesn’t know ANYTHING.
Mon Jan 10, 2011 12:17 am
MineMineMineUser avatarPosts: 130Joined: Mon Jul 19, 2010 12:39 pm Gender: Pinecone

Post Re: Python (Programming is Fun again!)

Pulsar wrote:I absolutely love Python, you can program things in a fraction of the time required for e.g. C++. The only downside is that, since it doesn't generate compiled code, it can't be used for high-performance algorithms. Other than that, it's fantastic. You're right, it does make programming fun again. I think it should be taught to students as their first computer language.




HUH? you actually can compile python.
I don't know how fast/slow python code in general is.
"I feel almost as powerful as an exposed nipple."
- P.Z. Myers
Mon Jan 10, 2011 12:52 am
PulsarUser avatarPosts: 872Joined: Tue Feb 24, 2009 5:52 pmLocation: Belgium

Post Re: Python (Programming is Fun again!)

MineMineMine wrote:HUH? you actually can compile python.

To bytecode, not full machine code. The difference in speed can be huge.
I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey

Science doesn’t know everything … religion doesn’t know ANYTHING.
Mon Jan 10, 2011 12:59 am
MineMineMineUser avatarPosts: 130Joined: Mon Jul 19, 2010 12:39 pm Gender: Pinecone

Post Re: Python (Programming is Fun again!)

Pulsar wrote:
MineMineMine wrote:HUH? you actually can compile python.

To bytecode, not full machine code. The difference in speed can be huge.


you actually can use stuff like ShedSkin to compile python native code.


And Ocaml bytecode itself is plenty fast so i wouldn't say that bytecode in general is bad thing or limiting speed
"I feel almost as powerful as an exposed nipple."
- P.Z. Myers
Mon Jan 10, 2011 1:23 am
PulsarUser avatarPosts: 872Joined: Tue Feb 24, 2009 5:52 pmLocation: Belgium

Post Re: Python (Programming is Fun again!)

MineMineMine wrote:you actually can use stuff like ShedSkin to compile python native code.

I've never used ShedSkin, but I'm aware of similar optimization applications like PyPy and Cython. They help in some cases, but they won't beat native C.

MineMineMine wrote:And Ocaml bytecode itself is plenty fast so i wouldn't say that bytecode in general is bad thing or limiting speed

Indeed, that's what I said. Most of the time, bytecode is more than enough. I just pointed out that it's not always sufficient for very intensive numerical work, like astronomical N-body codes, monte carlo simulations, or modelling algorithms, which sometimes run for days. For those problems, we sometimes have to switch to more low-level languages, unfortunately.
I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant. - Robert McCloskey

Science doesn’t know everything … religion doesn’t know ANYTHING.
Mon Jan 10, 2011 1:57 am
NecrotrophicPosts: 6Joined: Sun Jul 04, 2010 5:24 pm Gender: Time Lord

Post Re: Python (Programming is Fun again!)

i like python

though i tend to work in java or c++ for my personal stuff
Sun May 01, 2011 6:45 am
CaseUser avatarPosts: 1080Joined: Sun Feb 28, 2010 9:40 pm Gender: Cake

Post Re: Python (Programming is Fun again!)

I've started to code in Matlab as I took a course at university (I coded a bit in C,C++,Pascal when I was very young) and continued because indeed, high-level programming is a lot of fun. I'm considering relearning C++ as I've run into some speed issues with hefty problem-solving algorithms, but I've already written more complete programs with Matlab than I have ever before in C/C++, I guess because it's so intuitive so bugfixing is a lot easier. I've taken a look at Python and it isn't that different, just didn't have the time to teach myself the syntax. I'm also considering looking into LISP as I read an article that makes it sound quite attractive for a lot of reasons.

Long article saying that as high-level programming languages evolve they'll get closer and closer to LISP:
I am determined that my children shall be brought up in their father's religion, if they can find out what it is.
Charles Lamb (1775 - 1834)

Atheism is a non-prophet organization.
Sun May 01, 2011 9:47 am
borrofburiModeratorPosts: 3508Joined: Sun Jul 26, 2009 5:27 pm Gender: Male

Post Re: Python (Programming is Fun again!)

Case wrote:I've taken a look at Python and it isn't that different, just didn't have the time to teach myself the syntax.

I haven't done matlab in a while, but python is pretty different, unless I vastly mis-remember matlab.


Case wrote:I'm also considering looking into LISP as I read an article that makes it sound quite attractive for a lot of reasons.

Long article saying that as high-level programming languages evolve they'll get closer and closer to LISP

PG really likes LISP and makes it sound pretty awesome**. I don't actually know, the only functional language I know is OCaml, but I will say this: functional languages are nothing like imperative/scripting languages such as C and matlab, and they are nothing like object oriented languages such as C++ and java. Learning to program and think functionally is difficult. Certainly, you can mangle OCaml (and probably even LISP) into a matlab-like style (I've certainly seen "learn OCaml" guides that explicitly try to relate it back to C), but in doing so you've missed the point.

Functional languages are all about closures, currying, lists, and lambda calculus. If you don't regularly use the first three and think in the fourth, then you're probably trying to make the functional language fit into an imperative paradigm, when you should be making your brain fit into a functional paradigm.


**Seriously, I read that article last night, and I read a similar one by him a long time ago... It makes me want to learn LISP instead of doing the work I actually very much MUST get done today. On the other hand I am a little cautious, he's a LISP evangelist, and while I'm certain some people really are right when they say "check this thing out it's great you'll love it", it sets off a lot of alarm bells in my head.
Sun May 01, 2011 5:10 pm
CaseUser avatarPosts: 1080Joined: Sun Feb 28, 2010 9:40 pm Gender: Cake

Post Re: Python (Programming is Fun again!)

An evangeLISP, tee hee hee.

I must admit my look at Python was pretty cursory, I should remember to use e-prime (not the programming language).

My programming skill is probably very very low anyway, so it's not like I expect big results anytime soon, no matter what language I code in.
While I'm at it:
Does anyone have an idea how I could phrase this differently?:
if numel(uniproxy)>1 && heuristic(N*N)==uniproxy(find(uniproxy==uniproxy(uniproxy==uni(find(uni==heuristic(N*N))))))


I don't even know what it does anymore :D
Well, I do, but I don't quite understand why it does what it's supposed to do. It's what happens when you try to cram everything into 1 expression, I guess.
I am determined that my children shall be brought up in their father's religion, if they can find out what it is.
Charles Lamb (1775 - 1834)

Atheism is a non-prophet organization.
Sun May 01, 2011 11:39 pm
)O( Hytegia )O(League LegendUser avatarPosts: 3135Joined: Fri Nov 13, 2009 11:27 pm Gender: Cake

Post Re: Python (Programming is Fun again!)

A kindergartner could learn Python. And the fact that it cuts out all the tediousness of it makes it beneficial.
Typical Hacker round 1 challenge:
"Hello World" in any programming language.

print "Hello World"
"Hello World"

I got bored and made a lady-friend of mine a program to flirt with her and then ask her to the movies - and it makes it 10 times easier when you don't have a "No Thanks" option for the movie question. :P
Some would insinuate that being drunk at 9 in the morning to be signs of serious issues.
Me? I'd insinuate it as signs of no plans and a refrigerator full of Whiskey and Guinness.
Mon May 02, 2011 12:15 am
drentoPosts: 5Joined: Wed Oct 26, 2011 1:35 am

Post Re: Python (Programming is Fun again!)

Though it really is very easy to program using Python, I don't think that the curriculum should be changed to impart with new learners programming through Python.

It is very easy to program using it, and very efficient at that. I have been on it for a very long time already and loving it. There are some limits with it but you can find workarounds so that you can get what initially you can't contend with.
Wed Oct 26, 2011 2:23 pm
Post new topic Reply to topic  Page 1 of 1
 [ 12 posts ] 
Return to Developers' Corner

Who is online

Users browsing this forum: No registered users and 2 guests