Hacker News new | comments | show | ask | jobs | submit login
Why I Recommend Against Hackety Hack (inventwithpython.com)
46 points by AlSweigart on Dec 28, 2012 | hide | past | web | favorite | 39 comments

Hackety Hack maintainer here!

Two things:

1. As popular as Hackety Hack is/was, I have pretty much been the sole maintainer for the past few years. This is really, really hard. Like, "reverse engineer a website from the app's API" hard. "Spend 6 months trying to get it to compile" hard. "Deal with thousands of lines of uncommented C written by someone who specifically enjoyed obscurity" hard.

2. Technical debt due to Shoes (the GUI toolkit Hackety is built on top of, see above comments about difficulty) has led to a few people re-writing Shoes from scratch[1]. It is relatively active. Hackety development is on a moratorium until that work is done.

3. I volunteer with CodeNow[2], and we teach using Hackety to high school kids. They generally find it to be pretty awesome.

It is no secret that Hackety is not as active as I'd like it to be. Getting help is hard. I've asked for it a few times, and nobody (relatively speaking) wants to, so here we are. I will help anyone help me in any way they can.

1: https://github.com/shoes/shoes4 2: http://codenow.org/

Adding my two cents -- I'm new to programming, having started this year; and one of the first things I used to get the ball rolling was Hackety Hack. I got a lot of the fundamentals engrained in my head with it and definitely thank you for the work you guys put in thus far!

While I may have switched to a few other resources to learn, I felt like Hackety Hack was a GREAT first few steps in the right direction.

<3. One thing can never help anyone, so I'm glad Hackety was able to get you going enough to transition to something else, that's it's explicit goal right now.

... everyone. Can never help everyone.

Of course, this is against the ingrained commenting style of HN, but I genuinely got a chuckle from that mistake.

Hi, I'm the author of the blog post. I have to ask, wouldn't it have just been a lot easier to start from scratch with Shoes, but also start over with Hackety Hack?

I'm not familiar with the implementation of Shoes, but couldn't you write a wrapper for an existing GUI toolkit that just had a simplified API?

Or, since so much of Hackety Hack's GUI looks and acts like a web page, just implement Hackety Hack as an offline web app, where the typed Ruby code is just piped to the interpreter running on the box, and the results are returned as HTML displayed in the browser? It seems like a lot of work is reinventing basic things (text editor, GUI toolkits, etc.)

> couldn't you write a wrapper for an existing GUI toolkit that just had a simplified API?

This is exactly what Shoes 4 is. We're taking advantage of JRuby to handle this for us. Packaging was a huuuuuuuge question here.

> Just implement Hackety Hack as an offline web app, where the typed Ruby code is just piped to the interpreter running on the box, and the results are returned as HTML displayed in the browser?

I think the biggest thing that you're not appreciating here is how many dependencies there are and how they combine: this would not include Ruby. Or any of the libraries that work with it. Then we'd have to re-write all of the GUI code to be in-browser instead of the existing render to screen stuff.

> It seems like a lot of work is reinventing basic things

First rule of legacy code: You can't replace it all at once. This stuff takes time.

Telling one person "Can't you _just_ re-implement Mac/Windows/Linux GUI stuff (optionally re-writing it all in browser, of course) with embedded Ruby, write the app on top of it, make a website, write curriculum, promote it, and everything else?" is a bit... much, eh?

(oh, funny bit of history: Shoes was actually embedded Gecko long before it was a native GUI toolkit. but that's a story for another time...)

To give you an idea of size:

    steve at thoth in ~/src/shoes on develop
    $ cloc .
         367 text files.
         358 unique files.                                          
         613 files ignored.

    http://cloc.sourceforge.net v 1.56  T=2.0 s (150.5 files/s, 38339.5 lines/s)
    Language                      files          blank        comment           code
    C                                80           5749           2184          41915
    Ruby                            127           1471           1588          10045
    C/C++ Header                     66            890            825           4165
    make                             12            375             36           2046
    Objective C                       3            151             15           1845
    Bourne Shell                      4            168             68            877
    Perl                              1            213            503            731
    YAML                              3            156              0            249
    CSS                               1              2              2            167
    Javascript                        2             26             38            150
    Bourne Again Shell                2              3              3             23
    SUM:                            301           9204           5262          62213

    steve at thoth in ~/src/hacketyhack on master
    $ cloc .
          75 text files.
          75 unique files.                              
          45 files ignored.

    http://cloc.sourceforge.net v 1.56  T=1.0 s (64.0 files/s, 6483.0 lines/s)
    Language                     files          blank        comment           code
    Ruby                            62            735            471           5260
    YAML                             2              1              0             16
    SUM:                            64            736            471           5276

    steve at thoth in ~/src/hackety-hack.com on master
    $ cloc .
         205 text files.
         198 unique files.                                          
         598 files ignored.

    http://cloc.sourceforge.net v 1.56  T=1.0 s (94.0 files/s, 2411.0 lines/s)
    Language                     files          blank        comment           code
    Ruby                            81            383            430           1219
    HTML                             3              7              1            114
    YAML                             6              8             25             90
    CSS                              1              7             40             47
    Javascript                       2              0              9             28
    CoffeeScript                     1              0              3              0
    SUM:                            94            405            508           1498

    steve at thoth in ~/src/hackety_hack-lessons on master
    $ cloc .
          14 text files.
          14 unique files.                              
          43 files ignored.

    http://cloc.sourceforge.net v 1.56  T=0.5 s (8.0 files/s, 292.0 lines/s)
    Language                     files          blank        comment           code
    Ruby                             4             24             10            112
    SUM:                             4             24             10            112

Sounds like you got it figured out. Why don't you take care of it for him?

coz he's writing many more books related to programming for beginners, unlike you who's just got snarkiness and nothing else going for him/her

What kind help do you need?

Two main vectors of attack:

1. Shoes4. This is JRuby GUI toolkit work.

2. The website. This is a Rails app using MongoDB.

If you'd like to help with one or the other, email me at steve@steveklabnik.com and I'd love to point you to more details.

Is this abandonment a side effect of the 'work on a popular OS project' advice I've seen around?

It's not really 'abandonment' such as it is 'poor communication.' Nothing has been 'abandoned,' work is going on in a different repository now.

My son was 8 when I got him into HacketyHack, he loved it and made many little desktop apps using HH and it's shoes interface. His favorite apps where ones where the user was asked questions and things happened depending on what the user said. He loved showing friends and relatives.

HH had been abandoned since before _why disappeared. I have to acknowledge Steve and his happy band for recovering the project and getting it to a version 1.0

I don't know the full back story but shoes on which HH is based had many issues as a code base, also HH was originally designed so it would run on PC/Mac/Linux. As a cross platform desktop software the project is in need of more badass devs who are not afraid to do local Dev work on different os's.

My son has learnt a lot of code since he stared with HH and we found he then easily transitioned to Sublime plus shoes but if there were some more HH modules (and greater windows stability), I know even today he'd be keen to jump on there.

Glad to hear it. Thanks. :) I've heard of a few 7 or 8 year olds going through it, I'm glad I managed to make it accessible for them too (even with a little help, I'm sure.)

Almost every item of 'suckery' listed is something that can be fixed or rather, finished. And it's OS.

This is true, and I'd be willing to help anyone that wants to help me do it.

I'm not sure what kind of help you need but am sending you an email offering my services (if I can even provide any).

Thanks, I just sent you one back.

Spent last year learning to code. I had the same problem with Hackity Hack, it really didn't teach me anything. It was a huge handholding operation.

I did Team Treehouse last month and it was infinitely better. This is no criticism of Steve, who is clearly working hard, but just a realistic view of what tools you should consider if you want to learn to program.

Thanks! I actually consider 'a huge handholding operation' to be a big compliment: that's the point of a tool like this. You obviously didn't need handholding, but many do: they're my market. I'm glad Treehouse was able to help you. Keep building cool stuff!

Teaching kids Ruby? What happened to dreams? Do we want our kids engineering the next mobile dating platform for the enterprise? We should be teaching them OpenGL, C++, or maybe javascript.

OpenGL, C++ and Javascript? The winning ticket for the "brokenness" trifecta. I can't think of a combination in modern computing that would rot a mind quicker than these three.

There are already languages and tools that combine simplicity, sophistication and conceptual elagance. Scheme, Scratch, Oz, and yes, Hackety Hack.

I'm not understanding why you are praising Scheme and criticizing Javascript - the biggest differences between them seem syntactic.

You don't know Scheme if you think their differences are just syntactic. Hint: what about that whole prototype object sysytem?

There is a running joke in PL research that "programming languages = lambda calculus + constants". Scheme IS λ + k. JavaScript is that plus the kitchen sink with the Ringling Brothers Circus caravan in tow.

Syntax is critically important when teaching the average beginner.

You have to start simple with young children. Something has to happen relatively quickly to maintain engagement. Typing may not be fluid in most children still in single digit years. I suspect (but cannot prove) that if architectural ideas, and skills of 'debugging' and analysis are learned young, they will be able to learn more powerful languages and concepts later with less overhead.

Scratch (http://scratch.mit.edu/) is getting a lot of attention from teachers in the UK. The government recently scrapped the existing IT curriculum in schools and wants more programming taught in schools.



OK, HNers, here is something to chew on...

You have around 5 million children in schools between 5 and 11 years old. You have professional and well trained teachers but with variable skill sets, remember teachers teach everything to a single class in that age group. You have decent numbers of PCs/Laptops and some tablet use. The government wants all children to learn programming. What are you going to do?

1. Make programming a compulsory subject in high/secondary schools.

2. Hope that some of those students become teachers after their tertiary education where programming is included. Now you have 8 year olds being competently taught how to program.

3. Realise that teaching every kid to program doesn't work. The nerds now do hardware.

4. Government decides that all kids should learn to tinker with arduino.

My point is: not all kids needs to learn to program, only to know that it is something they might be interested in.

I take your points, especially the one about hardware, but the government has decided that, indeed, programming of some kind will be taught in schools! The development timescale is next year or the year after, so these skills will be delivered by existing staff.

My point is: teaching environments like Scratch, or Web sites with visually appealing interactive content related to programming will be in demand. Watch the social stuff though, we have a big safeguarding agenda in the UK.

What does the government want to achieve with this program? Has it been done elsewhere (Im thinking India but its not the same, is it?) You're right, visual appeal is key but I'd go lower and start with something physical, lego-like and kid-friendly, meant to filter for those who can, at that age, program something. Then work up thru scratch etc to actual coding. But the biggest problem will be to get the teachers used to teaching it. Would like to read more about it, any links?

The official stuff is here


but you wont find anything specific in that (our dear government is good at saying what is wrong, and demanding change but less good at saying what it actually wants - you can't be wrong then!)

The links in my original post give the flavour. There was further consultation and a couple of speeches by Gove. I'll dig those out after tea

EDIT: one proposed curriculum model


This tells you where the ICT teachers are


(the emphasis on basic computer skills probably represents the managerial response to the previous National Curriculim: skills development was ghetto-ised into ICT instead of word processing as part of English, spreadsheets in Maths &c)

Teach kids Ruby and if they are interested they will learn other languages later. Ruby (before you go on to rails) is very flexible in its use and good to branch from. C++, javascript, and opengl have very particular use cases, which is fine if you know thats you want to do, but pointless if you just want to learn generalised programming concepts...

If you want to go lower-level better to learn some assembly (or at least C) instead...

Agreed on assembly. Some beginners take exceptionally well to the "purity" they perceive in assembly (given that it's a good assembly language for a well thought out processor - a processor that doesn't physically exist could even be the best one).

Edit: Purity in the way that the crucial ideas are presented directly, and an intuitive understanding of primal computation can be gained directly.

Might I suggest Python instead? It's more immediately useful to kids interested in the sciences.

Let's do both.

This shameless post alongside its comments is the reason I and others have left OSS.

For a beginner, you need to check out www.codehs.com -- we've made it really easy to get started and a ton of fun to learn.

Plus, students all get access to and personalized help from tutors whenever they ask a question or submit their code.

CodeHS looks pretty good; logo-esque from first glance. I see a problem though...

As a parent having tried everything I can find (logo, scratch, hackety hack, invent with python, straight PHP programming etc. etc.) to teach my kids (currently 9 & 6) programming, the #1 problem is the medium is wrong: sitting still in front of a computer for more than 15 minutes is diametrically opposed to their natural behaviour.

The best approach I've found, which also makes a great party game is "How to train your robot" -> http://drtechniko.com/2012/04/09/how-to-train-your-robot/ . It works well because there are no computers involved.

Cargobot on the iPad also works pretty well, although largely because it's an iPad

Also recently had success with http://popapp.in plus UI stencils although this is more design / hypermedia than programming

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact