Domain: hobix.com
Stories and comments across the archive that link to hobix.com.
Comments · 33
-
Re:SQL?
Making it run the same validation code isn't trival
Here's a starting point...
Short answer: Not yet. But given at least the simpler server-side validations, I see no reason you can't use those to generate javascript on the client side, for validations which are simple regexes, length, etc. And for those which aren't -- uniqueness, for example -- it's even easier, and I wrote a method to do that myself -- just have the client request that the server run the same validation code it would if you submit the form.
Or, javascript engines aren't hard to run by. Just take the client-side code and run it on the server, too.
Either way: Really not a hard problem.
The point here was the extra development time required to do the validation upfront.
No, the point being made was that it was somehow impossible, or that most web apps wouldn't do it.
I think they didn't mean technically advanced, just ones that can do their job & end up waiting for post responses, switching between keyboard and mouse and tabbing through unnecessary fields.
Probably. But I am basing this around the assumption that there will be at least one technically advanced user in the office -- there are tons of personal-itch hacks in VBA, even among management types. I expect there would be personal-itch Greasemonkey scripts, as well, and there probably are already.
Poor design is not unique to the web, but some consistent keyboard shortcuts aren't much to ask for - eg Enter for form submission anyone?
Just so. And there's no particular reason you can't add keyboard shortcuts to a web app, also. Depending on the browser, there's no reason you can't do do stuff like this, which I know to work on Firefox, at least.
And none of this is standing still. It's already to the point that even if you accept all of these arguments at face value -- you say, yes, validations are going to be duplicate code, and cross-browser headaches, and so on. Even if all of these are valid, there are still pretty compelling reasons to build it as a web app.
But I think most of those, even if they're an issue today, won't be a year from now. The form validation, if it's not already done, I could write myself.
-
Re:Assembler
I don't discount the value of being able to think at the level of machine code. A "bare-metal" language like ASM or C should be introduced in the first year of study. But there will be plenty of opportunities to get students thinking in 1's and 0's.
No matter which language you decide to introduce first, it's going to be the hardest one the students ever learn. My purpose in suggesting Python is to make sure that teaching the mechanics of the chosen language isn't overwhelming, to the extent that it obscures the concepts.
Starting with ASM has the following drawbacks:
* It makes the introductory course almost useless to anyone who doesn't intend to carry forward in CS.
* Showing students the frustration before showing them the power leads to high attrition. Some argue that high attrition just weeds out the weak. I would counter that it actually weeds out the atypical CS student, which is a different thing entirely.
* You can't implement important concepts like recursion in a straightforward, easily graspable way. Even straightforward concepts like the "function" and the "loop" get difficult to teach, with the mathematical properties getting lost in clumsy implementation details.
* It's hard to come up with assignments that apply to the real world in a meaningful way. What's the most complex, real-world project you could assign at the end of an ASM-based class? It's practically a guarantee that a Python-based project would hold more interest. The experience of building something very useful very early is critical, and I don't think ASM makes that likely. Python + pygame = "hey, I built a cool game!"
* You're going to spend the first two weeks of the course simply teaching the students how to set up and use their ASM software. Python is a quick install on any machine, and Ruby doesn't need an install at all: http://tryruby.hobix.com/
In the end, programming is about solving problems, breaking them down into simpler parts, and learning to reason about those problems. If you can bring that experience using real-world tasks, rather than assuming that moves and loads and stores are inherently interesting, you'll get a wider variety of students hooked on programming, which will eventually make for a healthier discipline. Trust me, there is plenty of time to teach students to think in 1's and 0's, once you've convinced them that it's worth their time to do so.
-
Ruby
I know I'm late to the thread, but I've used Try Ruby with some success on that age group.
I'm suggesting the tutorial more than the language -- it's easier to pick up a new language than it is to start programming in the first place.
There are reasons I'd suggest Ruby, of course -- if they find they want to write performance-critical apps, it's Algol-like enough that C won't be too hard to learn. But if they do stick with Ruby, unlike JavaScript, there's a gradual, natural progression to more and more advanced things. JavaScript mutates as you learn more about it.
-
Re:Wrong question
I think Basic type languages are good for getting your feet wet because you don't have to think too much and when you're not used to programming it might seem daunting to do C or Lisp or something
That's, again, why I recommend Ruby. Not too much you have to think about right away, but...
after learning a real OO language trying to continue a project I had started in VB was just too painful.
That doesn't really happen with Ruby.
Sure, it's going to be painful because you know much more now than you did when you started the project -- but that's true regardless of the language.
But you don't find yourself suddenly disgusted with the language after you learn more -- at least, that was my experience. And, equally important, you don't have to make that big a conceptual leap from your early days of picking up the language to realizing its full potential -- it's a natural evolution.
And, again, less to unlearn -- compare to JavaScript. You can stay in the same language, but you'll have to unlearn the "with" command, avoid using implicit global variables, stop using document.write (ever!) or eval (almost never!), push everything into separate files (and not in in some onClick or onSubmit event in the HTML), at the same time as you're learning closures, OO, and prototypal inheritance.
I love Javascript, but that's only after forgetting half of what I thought I knew about it.
If you've got time to reply to me, spend 15 minutes instead and follow that link, type "help", and follow the tutorial. Both to learn a bit of Ruby, and to understand just how good an introduction to programming can be.
-
Wrong question
More than that, there are other concepts, like functional programming, which are somewhat mutually-exclusive with imperative programming.
And I would say, don't teach a paradigm at all. For your very first class, give them something like this introduction to Ruby. After they have a vague concept of how a program goes together, then you worry about teaching them other paradigms -- ideally, they should learn all of them eventually.
Also, avoid starting them with something like COBOL, Visual Basic, or Java. These things may tend to rot their brains.
-
Re:future of perl?
myself I think that it still looks like noise different noise from Perl5 but still hard to read and to maintain.
One of the features of Perl6 that I really like is custom syntax. That helps a lot.
I like a lot of Ruby syntax, some of it Perl-inspired -- the optional brackets are beautiful. I like Python's indentation, and if I could, I'd probably be using Lazibi in Ruby. I like Javascript's object notation, and its treating of hashes as objects.
A lot of these, though, are mostly cosmetic. Certainly it's possible to abuse things, but by making the syntax separate, it means we can stop arguing about what syntax makes a good language, and start focusing on other features.
For beginners, there's Python,
I don't know, I've yet to see an environment beat Try Ruby for sheer beginner accessibility.
-
Re:troll? really? mod up again!
Because software isn't religion. There's a right answer and a wrong answer. You prove things.
Even if you can't look at a three-line code sample and follow the logic (which I doubt - if you tried) people could write a demonstration of the flaw in, for example, Ruby, which you could cut and paste into another browser window and run on someone else's computer so you didn't need to worry about trojans.
If this was legit the code would look like this
CPUID = get_cpu_id
[...]
case CPUID
when 'Intel' ; enable_SSE2
when 'AMD' ; enable_SSE
else ; enable_nothing
endSeriously, that's how complex it should look.
With some searching even a non-programmer could find that simply by searching for strings like SSE and the logic should be fairly clear.
-
Shoes, Gibson and Garry's Mod
Shoes:
http://code.whytheluckystiff.net/shoes/Try Ruby:
http://tryruby.hobix.com/William Gibson books.
Garry's Mod.
-
Re:Ruby as a first language?
Why not? It is an acceptable LISP after all.
Combine the approaches of try ruby! and the Purple Book, and you can't really go wrong.
Now all we have to do is wait for such a book. Finished with pickaxe flavoring. -
Re:AJAX is for writing applications not Documents
The line between application vs document gets blurry, fast. Consider a site like Try Ruby!. There's definitely content hidden inside the tutorial, yet a search engine will never see it.
-
Re:Bad XMLXML is OK for interchange
... I don't agree. I think XML is pretty sucky for interchange. JSON or YAML are much better (and more compact) data encodings than XML.
It's looking like JSON is becoming its own industry standard.
And, of course, JSON and YAML are almost the same thing. -
Re:Yes, but it's rails... ;)
Ruby or Python are probably the best places to start; they're not going to be suitable for every type of programming you do, but they might teach you some good habits before you learn other languages with horrific syntax and dangerous pointers, and you can get going very quickly.
For Ruby, there's Chris Pine's Learn to Program or Why the Lucky Stiff's Poignant Guide to Ruby which is whimsical, but does pretty much the same thing, or just go to Try Ruby and type help.
For Python there's Instant Hacking, or Useless Python and I'm sure many others. These two sites, like the Rails site, are written in PHP, but I wouldn't touch PHP with a barge-pole if you're learning just now, it's only useful for web apps and will teach you bad habits. -
Re:Rails is Doomed
I think Rails has already "caught on".
Also, that blog post has a ton of errors. Here's one: If you want to write a Web application in Ruby, there is only one solution. Only one. Ruby on Rails. Hm, about about Camping or Nitro?
Rails scales perfectly well, just the same as any other share-nothing approach.
Ugh, so much FUD. -
Re:Keep it simple ...
I believe that, in most cases, the problems lies in the page generation. I guess most webmaster test their "static page" layout against xhtml validator, and then use PHP or ASP to generate their code at production-time, thus mixing server code and presentation code. A nice solution I find for this problems are XML constructors like Ruby's Builder and Rails' Markaby. Both of them save a lot of typing (no clumsy </tags>) and will scream at schema error.
-
Re:A question...
-
Teaching programming, not languages
As a EE I learned how to program C and then Java. But I never enjoyed programming all that much. Learning programming was all about learning the syntax of the language, and the language was focused on pleasing the computer and the compiler. But programming isn't about languages, and it is not about thinking like a computer. It is about problem-solving and creating with the use of a computer. I am learning that now that I am not constrained by curriculums. People are going to continue to be turned off by programming as long as they are introduced with classes that focus on learning the syntaxes of languages that focus on pleasing the computer. Classes should be taught in languages of the mold of Ruby and Python, with emphasis on actually accomplishing things, not learning a language. http://tryruby.hobix.com/
-
Interactive Try Ruby Website
And for others, there's always the interactive http://tryruby.hobix.com/.
-
Re:Getting started
I'm not sure what you mean by a website that can show off what the language can do. Ruby, the language is independent of the Ruby on Rails framework.
But if you do mean that you want to see Ruby executed, an online interpreter is available.
If you're asking for examples of what Rails can do, it can do only what you can do using any other language on the server-side, only much faster and with cleaner code. -
Re:Getting started
This is a good place to start: http://poignantguide.net/ruby/ and then perhaps this: http://www.pragmaticprogrammer.com/titles/ruby/ (Either one is good -- I used the latter)
Or, if you're on the lazy side of things, you can try it right within your browser here: http://tryruby.hobix.com/
I hope this helps. -
Re:Totally fresh in programmingAnd i came to the conclusion that Python is very close to a perfect place to start learning programming.
I've used python as a language to teach people programming (in the context of a physics course, to do numerical simulations). It was OK, but the significance of whitespace was a major barrier for them to overcome. If I was doing it over again today, I'd probably use Lua, which has a very standard C-like syntax. Another consideration is that it might be good to use a language that's small enough to run in a web browser.Python's strengths, AFAICT, are its pure object-oriented design and the large set of libraries available for it. IMO, neither of these are particularly important for teaching beginners to program.
-
Java is Like Church
Java remains an excellent choice for serious web apps which you're going to want to maintain later.
Java remains an overly verbose and inflexible language that requires intensive and detailed study of the gargantuan API before ANY development work can even begin. I have never understodd the allure of Java, and I probably never will.
After reading the article, I've decided to at last take a glimpse at Ruby. First google result was this, an interactive web tutorial. I'm tinkering away like a kid in a sandbox. It's kind of fun.
Compare to Java. Here's the spec. You WILL need to read substantial portions of this before you even begin to program anything of substance. Learning Java, along with all its quicks, restrictions, paradigms and frameworks, reminds me of going to church and hearing all that nonsensical dogma. I never liked church. Ruby just reminds me of perl.
For me, a language has to be somehow fun to program in for it to be useful. You may find that ridiculous, but if I'm not enjoying what I'm doing, my work will be substandard. Java was never fun. I don't think java is even fun for Java zealots. Java has always felt like a chore.
I'm on lesson four in the Ruby tutorial. It feels like it could be fun. I'll let you extrapolate the future. -
Try Ruby here! In your browser! Painless!
Try Ruby (the language) here. Integral to understanding much of Rails.
I released my first production Rails app last month. I like it a lot. I have a background in ASP/SQL Server/PHP. Not having to use Microsoft Windows itself is a huge win. But I like the design of the language and the framework and the built-in separation and a thousand little other things. Check out #rubyonrails on irc.freenode.net, great community there too. -
Re:if i'm new to web development...
i take it i should stick to a very solid LAMP base then look into ruby on the rails once i have some real code under my belt? make sure i don't learn some trendy language that dies in a couple years? and i assume this isn't a good language for someone with very little (essentially no) experience to jump into and try to learn?
I dunno, I don't think it's worth starting at the end : ) Ruby is a very nice clean language, and rails builds on that. Ruby isn't going away any time soon - Python and Ruby will probably supplant a lot of Perl over the next 10 years. I'd say you'd be better learning one of them rather than PHP, as you won't learn bad non-oop habits before tackling oop (which really isn't as hard a concept to grasp as people make out). Have a look at this tutorial for a flavour of what Ruby can do.
I'd say Ruby is the ideal beginners language.
http://tryruby.hobix.com/
try 2+ 2
then perhaps
zoo = "ardvarks " * 5
zoo << "parrots " * 2
zoo.include? "ardvarks"
Rails performs operations server-side which spit out html/xml whatever, just like PHP, however it separates out the programming stuff from your html templates, and the programming from the database stuff, so that you don't end up with a mess of code and sql and html at the end. You'll need to know about the Model View Controller paradigm (worth reading up on this). Basically
Model - Database wrappers
Controller - Programming
View - HTML templates
You need to install a database (take your pick), then you edit the config file to point it to your database. -
Re:Give ruby a quick try first
I heartily suggest that the curious among you check out http://tryruby.hobix.com/
That web page is neat but it's a perfect example of why I'm starting to dislike all this "AJAX" stuff. Nowhere in that tutorial is there any navigation to help me go back if I want to review something again. I hit the back button and it brought me back to your comment, not where I expected to be. I don't know how other people feel but in my opinion breaking the user's back button is the worst web UI mistake that you can make. The URL also never changes. I can't bookmark the tutorial and pick it up later from where I left off.AJAX is nice for doing things like google suggest or scrolling around google maps, but the moment I submit something, like hitting return on that site, my history should update and I should be on a new page. When I hit the back button I should be back where I just was. That's my expectation.
I'm afraid of what's going to happen to web pages in the next few years. AJAX is something shiny and new that everyone wants to start using for the sake of using it without considering the expectations of usability that have been established by over a decade of browser use.
Anyway, just my two cents, FWIW.
-
Give ruby a quick try first
I heartily suggest that the curious among you check out http://tryruby.hobix.com/. It's a great, quick interactive introduction to ruby. You can kick around the tires (so to speak) without needing to do anything more than visit the webpage. It's a great language with or without rails.
Also a great example of Ajaxy goodness, not to buzzword it too much. It's written by the affluent and creative why. Check out his neat-o blog too: http://redhanded.hobix.com/
-mix -
Give ruby a quick try first
I heartily suggest that the curious among you check out http://tryruby.hobix.com/. It's a great, quick interactive introduction to ruby. You can kick around the tires (so to speak) without needing to do anything more than visit the webpage. It's a great language with or without rails.
Also a great example of Ajaxy goodness, not to buzzword it too much. It's written by the affluent and creative why. Check out his neat-o blog too: http://redhanded.hobix.com/
-mix -
FUSE is way cool
Check out FuseFS, for example (see why it's cool). Or encfs (see O'Reilly article).
Linux is starting to go beyond emulating the Unixes of yore, to create a whole new world of computing. -
Re:His words seem genuine
That's what hoodwink.d is for.
-
Re:lame excuse
I suppose Ruby could be a cult, as evidenced by the fact that Ruby can be used to lure Genine Garafalo into your unicorn garden... or something like that.
But does Ruby like koolaid? I don't know. I just don't know.
To be honest, I've been using Ruby in a zen-like trance to help me attain my buddha-hood, so I haven't watched these in awhile. -
FOSCON slide show
Check out the FOSCON slideshow .
Why the lucky stiff's performance which included his own animations, shadow puppets, and an inside look at a meeting of the Ruby cabal The Least Surprised was hilarious. -
Re:Offtopic - Ruby
why's (poignant) guide to Ruby A very cartoonish introduction to Ruby and programming in general. This one hides complexity of the language at first, but goes into more detail later. It uses interesting analogies and stories to keep the whole thing interesting. Has been praised all over the place. Programing Ruby, The Pragmatic Programmer's Guide annotated version The first edition of the definite Ruby programmer's in-detail book. I learned Ruby using this and enjoyed doing so. Make sure to try out lots of code in IRB while you read it. This version has been annotated so you can easily find places where the language changed since the first edition was released. The second edition is better than ever and you will have to pay for it. Many people happily did so, even if they already had a physical copy of the book. RubyDoc A short and fast introduction to Ruby. Teaches you how to learn by yourself, using IRB, Ruby's amazing interactive code interpreter. Introduction to Ruby Another relatively rapid introduction. Not too much to say about it, but it looks straight-forward. A little Ruby, a lot of Objects While this is more of an introduction to OOP in the world of very dynamic languages, it uses Ruby to express its samples. Definitely worth a read to see just how easy things like meta programming are done in Ruby.Wheres a good tutorial site? (multipule if possible)
Programming Ruby: The Pragmatic Programmer's Guide, Second Edition I already hinted at this in the above list. Definitely worth getting, has all the details. You can either buy this from your local evil overlord mega corporation or directly from the Pragmatic Programmers who are also offering a PDF version on their site. The Ruby Way This goes a long way to explain how to do specific programming tasks in Ruby. It's a slick read and the code sample will usually show insightful ways of using to the language in powerful ways in detail.Any books worth reading?
There's more than these, of course, but these will definitely get you started.
Ruby-Doc Collects lots of documentation of Ruby on one single site. RedHanded Coming from the same guys who brought you the poignant guide to Ruby this is already guaranteed to be a very interesting read. One of the nicest Ruby weblogs there are right now. Also have a deeper look at his Links sidebar, it contains lots of good stuff. Ruby Application Archive Contains lots of interesting Ruby libraries. A nice place to start research. Has been largely superseded by RubyForge These guys offer free Ruby project hosting. You get everything from a bug tracker to CVS access and automatic geneGeneral resources sites?
-
Re:Useful Ruby Online Resources (categorized)
And while you're mentioning _why_'s stuff, there's also the RedHanded Ruby blog:
-
Re:Useful Ruby Online Resources (categorized)
And don't forget Hobix, a blogging software written by the same guy. You can install it with a one-liner: ruby -ropen-uri -e 'eval(open("http://go.hobix.com/").read)'