Skip navigation

Monthly Archives: May 2013

What’s a Geek blog without poking some fun at Microsoft eh?

Microsoft previews update to Windows 8; the Start button returns

Microsoft is providing a first look at Windows 8.1, and among the new features in the update is the return of the Start button that was taken away in Windows 8.

Additionally, users will have more options for what they set as their Start Screen background. Users can select images with motion or select their desktop picture (a picture of their family, for example) as the background for the Start Screen. They’ll also be able to further customize the Start Screen by arranging their apps using more tile size options.

I’m glad I haven’t even bothered touching Win8.  Not much I can’t do with Linux that I _need_ Windows any ways…so meh.

And while we are at it, why not throw in a bit of paranoia shall we? (aka, what’s a Geek blog without poking fun at Social Media….)

Why your social media profile might be your next credit score

Social media has created a vast amount of data and every second we add more information. Consider that in a single day we send 400 million tweets, share 985 million pieces of content on Facebook, “like” 50 million brands or organizations on Facebook, and post 40 million photos on Instagram. Many have argued that sharing so much personal info in such a public forum can leave users open to identity theft and fraud

Now, back to tweaking that choose your own adventure code to get it just right 🙂

 

Advertisements

I am finally finishing off the Learn Python The Hard Way lessons that got shelved because the Coursera course was taking up all my time.  One of the lessons included making a program that is basically a ‘choose your own adventure‘.  It’s a pretty basic program, mostly a lot of ‘if’ statements to choose which section happens next.  While not terribly complicated and barely any different from many of the original books that did the same, it was a good lesson in tracking how your program flowed and making sure the results were what was expected.  So, here it is.  Yeah, I borrowed heavily from a Dungeons & Dragons module but I’m not selling this, nor do I ever plan on making money.  It was merely backdrop material, so Wizards, don’t bother suing me 😛

Since pasting code here and trying to keep its format doesn’t work so well, you can see it here:

http://bpaste.net/show/9ScYudSvDyHuUQdWDR13/

BTW, it’s not exactly SFW…so keep that in mind.

I like to have as many resources available when I need help.  Who doesn’t?  So, besides Google (which needs a certain skill to get the right answer to your specific problems typically), I also make great use from IRC.  These are the channels I use on freenode.net (YOu can get to them either by http://webchat.freenode.net or download a client like XChat)

#python (You need to have a registered nickname as well ask for a ‘cloak’ in the #freenode channel, otherwise you don’t get in.  It’s all free, but just need to ask.)

#python-apac (This is a new one for me as of today.  It says it’s for the Asia Pacific crowd but there’s only 2 people in there right now and I’m one of them.  Was hoping to find some english speaking Python guys in my own timezone to chat with.)

#python-forum (This is the official channel for python-forum.com, not a lot of people there but also not many who are currently active for my time of the day too.  I suspect it might be a mostly ‘western’ timezone active channel)

#dragondon (This is my own personal channel.  A few geeks hang out there.)

I just registered on python-forum.org.  I wanted a place that I could post up questions.  Seems a cool place so far.  They have some cool tips and I thought I would share one of them that I found.

****

Avoiding massive elif statements
the first example shows elif statements as you would learn them in any tutorial, the second however shows the same thing done but with no elif statements. It does the same thing but reduces the code and makes it more debugable in the future.

choice = input(‘enter a number’)
if choice == ‘0’:
print(‘you chose zero’)
elif choice == ‘1’:
print(‘you chose one’)
elif choice == ‘2’:
print(‘you chose two’)
elif choice == ‘3’:
print(‘you chose three’)
else:
print(‘out of range/invalid’)

user_choice = {‘0′:’zero’,’1′:’one’,’2′:’two’,’3′:’three’}
choice = input(‘enter a number’)
try:
print(‘you chose {}’.format(user_choice[choice]))
except KeyError:
print(‘out of range/invalid’)

I decided it would be worth putting together a review of the courses that I’d like to see and get people’s feedback on.  Sure it was inspired by my recent displeasure(and subsequent quitting) of the Coursera Interactive Python course but it is by no means, intended to denigrate it.  In fact, I have not even added my own response to this questionnaire.

So please have a look at the page and let me know your thoughts on learning Python!

 

 

I wrote a message in the forums and added a little bit at the beginning then posted what I posted here a few days ago.

“I posted this on my blog (https://cosmopolitangeek.wordpress.com) and I’ll repost it here.  I am finding no joy in this course, I am not learning here.  I have been doing nothing but beat my head against the wall.  This course only works for those who have programming experience before, or at least recent math/logic courses from high school and/or university.”

See this link for the in-depth post on why I was not happy with the way the course was structured.

I’m going to finish the Learn Python The Hard Way course (and probably even buy the pdf/video version and do it again…yes, it’s that good I found).  I have found a few other places with tutorials.  I’ll detail them if I get into them.

class UnderstandPython(Fight_Club):
def do_you_understand(print “Shit, I lost it”)

Yes, the Coursera(RICE University) course on Python is hard. And I’ll keep complaining till it’s done. I can only pray that my pain ends soon.
looks-like

image

This is because of 1 part headache brought on by two parts ‘staying up till 6am to get this weeks project done’.  Don’t worry, an Ibuprofen and a good mug of cold-brewed coffee will clear that up in about 30mins 🙂

The idea of programming is to learn something, then build some code, learn something more, add it to previous knowledge, build better/more elabourate code and so on.  This is something I think is a good process.  And a course that can coax it’s students along with the right methods is one you will never forget.  On the flip side, one that does this but kinda skips over various things with the idea of ‘you can find it online’ really irks me.  I really feel that the progression of learning is NOT linear with the Coursea/RICE University course.  There are major gaps in my understanding of what is happening within the code we are supposed to be writing.  I am getting lots of good help from some of the students who hang out in IRC, for which I am ever grateful.

I’d like to also point that their “Workload: 7-9 hours/week” claim is utter bullshit.  I mean seriously, where do they pull that number from?

This course is designed to help students with very little or no computing background learn the basics of building simple interactive applications.

Right, so here I am, a technician who has been playing with computers for 30 years, designed websites in the early HTML days (so I have a general idea of coding….very general), had fiddled with CSS and WordPress templates and I understand how computers/networks work and yet this course has been nothing but a struggle.  From the time I woke up yesterday till the time I went to sleep, I spent nearly 16 hours on the course.  This was just insane.

I am far from someone who has “very little or no computing background” and having this much hard time?  You think that their course needs a severe overhaul on how they progress their teaching?

Sure, I’m not expecting to be spoon-fed every little piece but when you are forced to program in an environment that is mostly non-standard(meaning most Google results for problem solutions will never apply because of  many restrictions in place.).  I do understand why they use CodeSkulptor, but I feel if you are going to create an artificial environment, you need to be much more involved in the students learning.  Notice I said learning and not helping.  Sure there are many avenues of help, the forums, IRC(sadly under utilized really, people are so missing out), the minimalistic docs they have, the ‘code clinic threads’ and such but that is all reactive.  In order to ask a question, we have to be knowledgeable enough to ask how to do something, not ‘what’ should we be doing.  Also, their assumption of ‘high school’ math requirement does NOT mean ANY high school math.  You have to have that knowledge and have it as recent in at least the last 5 years!  Anything beyond that and you will have a hard time because there is a lot of math in programming.  I highly recommend going through Khan Academy‘s math lessons.  They have an awesome way to track and incrementally increase the parts you are learning.

The instructors themselves have some cool character to them.  When they do their videos, they do them well, I find that they just don’t go far enough.  In my opinion, I think the course should be doubled in length and more time spent on each part.  I am quite fortunate to have as much time to spend on this course as I do.  If I was working a full-time job, I would have dropped out last week when I stayed up to 4am one day.

Do all students have such problems?  No.  One guy from IRC did this weeks memory game assignment in 4 hours.  He spent the rest of the week tweaking it to be pretty and fancy for the hell of it.  He is also one of the best people to help others and I can’t thank him enough.  This also means that since he did it in 4 hours, he is not a beginner to programming either.

After all this, I think that they should either change the course or change the description of the target market for students.  Easier to change the description and create a second course I think.

Now, from here on out, it will get interesting.  See, this week’s project I scrapped my first version of the code I was writing.  That was two days into writing it, getting up to 171 lines of code only to find out that the exact same thing, that works with no bugs, could be done in just 39 lines!  I saw this code and sat there….stunned.  I started over, took some cues and was able to focus on the mouse_handler function(which is the crux of this code) only to find out a day later that it was completely buggered as well.  That was when another kind individual on IRC so graciously spent 7hrs chatting with me to help me get it right and by 6am it was finally done.

Do you still think that 7 – 9hrs of workload is accurate?

Let me also point something else out.  If it takes you 4 hours to learn something, the next time you use it technically take you less time to construct the same code.  So let’s say you can do it again in half the time, 2hrs.  Let us then apply this to my taking 4 days to learn/write a program.  So now I might be able to do it in 2 days.  With the idea that the course is building upon the skills we have learned what do you think will happen in a few more weeks?

  • wk 4: 4 days to program
  • wk 5: 2 days(wk 4 code) + 4 days (wk 5 code) = 6 days
  • wk 6: 2 days(wk 4 code) + 2 days (wk 5 code) + 4 days (wk 6 code) = 8 days
  • wk 7 1 day (wk 4 code, getting better) + 1 days (wk 5 code, getting better) + 3 days (wk 6 code, slight improvement) + 4 days (wk 7 code) = 9 days

Well, ran out of days in the week it seems and missed the deadline.  I didn’t even count the time to watch the lecture and do the quizzes.  This course has so far consumed my nearly every waking moment each week and I am not even close to being a ‘slow learner’.  The way the material is presented simply isn’t enough for “students with very little or no computing background”

 

 

Just saw this:

Welcome to Google’s Python Class — this is a free class for people with a little bit of programming experience who want to learn Python. The class includes written materials, lecture videos, and lots of code exercises to practice Python coding. These materials are used within Google to introduce Python to people who have just a little programming experience. The first exercises work on basic Python concepts like strings and lists, building up to the later exercises which are full programs dealing with text files, processes, and http connections. The class is geared for people who have a little bit of programming experience in some language, enough to know what a “variable” or “if statement” is. Beyond that, you do not need to be an expert programmer to use this material.

https://developers.google.com/edu/python/

I’ll have to check it out, maybe if I can get this week’s project done early enough.