JavaScript != Assembly | CR 03

JavaScript != Assembly | CR 03

Some have called JavaScript the “Assembly Language for the Web”. Is this an insane argument, or is there some truth that we should acknowledge?

Plus we lay down the first blocks in our new open source Jupiter Broadcasting community app.

Then Michael shares a great tool for beginners or longtimers looking to refresh their skills.

And we’ve got a big patch of your feedback, and much more!

Direct Download:

MP3 Audio | OGG Audio | Video | Torrent | YouTube

RSS Feeds:

MP3 Feed | OGG Feed | Video Feed | Torrent Feed | iTunes Audio | iTunes Video

Show Notes:

Feedback

The Argument

But wait! What is JavaScript anyway?

  • Papa ECMA
  • Isn’t JavaScript related to Java
  • Classical vs Prototype inheritance

So how did things ever get so bad?

Support Jupiter Broadcasting, and keep ads to a minium

JB Project Announcement

Tool of the week

Mentioned:

  • http://twitter.com/larzconwell Larz Conwell

    Title should be changed to “JavaScript !== Assembly” (;
    Don’t want to do type conversion on something that isn’t needed!

  • http://twitter.com/dominucco Michael Dominick

    @twitter-356555426:disqus LOVE IT! Be the compiler! 

  • Steve Coffey

    Talking about coding and have not mentioned anything about illumination software yet.  great for beginners
     

  • http://twitter.com/dominucco Michael Dominick

    @14f6f3ac6b705ab4883313f779ec01ef:disqus Mentioned it in the first episode actually :)

  • Yeadon_eric

    Hey Michael what’s your email I’m interesting in joining the project. 

  • http://twitter.com/dominucco Michael Dominick

    I’ll do you one better https://github.com/dominickm

  • cinch

    conclusion: we should all be writing in assembly ;)

  • Guest1338

    “Mike’s website” and “Chris on Twitter” are both broken links.

  • http://twitter.com/dominucco Michael Dominick

    Le sigh… ok my website is mdominick.com Chris is @ChrisLAS:disqus 

  • DF

    Subscribed yesterday for codeschool.com (with the affiliate link, of course!) and just finished up jQuery First Flight.  It was very fun, and had a ton of good tips.  Great tool @twitter-285215642:disqus! Thanks! Next stop, freshen up my CSS!

  • Guest1338

    Yes I can figure that out, I was just pointing it out because it doesn’t really look professional and because you’re likely to copy/paste the same markup for future shows, so it would be pretty bad to repeat the same error.

  • Yarrith Devos

    Ok, so I noticed some stuff that was said in the chatroom (and actually by the hosts as well).
    Time to bust some myths:
    1. Java is slow
    Actually it’s one of the faster popular languages out there today. Java is generally only slightly slower than unmanaged C/C++ apps. It was slow before the java HotSpot VM (until java 1.3 in 2000), but since then IT-compiling made it one of the faster managed code languages.
    It is definitely faster than python because python is straight up interpreted (same as java before the HotSpot VM). Java is also generally faster than mono, which uses a similar approach to run code (a VM to run an intermediate compiled language on any architecture supported). The only thing java has is a higher memory footprint and a small startup delay, but these are small enough to ignore. Java also has reliable performance, not too much difference between the fastest and slowest programs benchmarked.
    Also important is that the performance of an app is more dependent on the quality of the code than on the used language/framework. 
    Here’s some benchmarks to support my case: 
    Python 3 vs Java 7:  goo.gl/7bCEh
    C# Mono vs Java 7:  goo.gl/bIAaO
    All benchmarks in a boxplot:  goo.gl/gWrda

    2. Java looks bad/doesn’t look native
    This actually depends on the used framework. If you’re using unthemed swing as a GUI framework this statement is true, but it is not necessary to use swing. If you theme swing with the GTK look and feel, it’ll look native on some platforms, although the text will look weird and there’s no globalmenu support for ubuntu. You can use libraries that use a systems native widget toolkits though (Java-Gnome GTK, QT Jambi,  SWT).

    I really hope these myths will stop spreading, maybe an idea for a future episode, busting myths about programming languages/frameworks?

  • http://twitter.com/dominucco Michael Dominick

    @google-6c62db596567edc73e7e8335b734a85c:disqus You are of course correct, though I hadn’t seen that Mono V Java benchmark before thanks for sharing it. 

    BTW I love that episode idea and will be sure to use it. Stay tuned!

  • http://twitter.com/larzconwell Larz Conwell

    About #1: Java is slow when it’s first started. It’s incredibly fast once it’s warmed up good, but it has a horrible start up time making it useless for things that only last short periods of time.

  • Yarrith Devos

    Horrible start up is a bit of an overreaction. It is not really a language to make a small app you will use for a couple of seconds, that’s true. If my app was a simple text editor or a calculator, I would use python (because you won’t need the performance and the app will start immediately because there’s no JIT-compiling in python). But for most apps, a start up time between 4 and 7 seconds is not really a big deal. If we compare it to mono again, mono is generally slightly slower in start up than java is, so if you want an app that boots up really fast and has great performance, you’ll need unmanaged code (C/C++ for example), otherwise you’ll need to make a choice between fast boot or performance (or JIT-compiled vs. Interpreted).

  • http://twitter.com/larzconwell Larz Conwell

    4-7 seconds is a huge time for start up time. Especially for consumers who want their programs to be as responsive as possible[1]. Plus I wouldn’t want my consumers to _have_ to have JRE/Mono installed just to run an app that they’ll most likely have opened for 10-15 minutes.
    PyPy has a JIT compiler (; And it’s much much faster than CPython!

    Desktop apps shouldn’t have to be written in a huge heavy[2] weight language(Java, Mono, etc.[3]). You just need a language(compiled or interpreted(JIT is interpreted)) that’s reasonably fast and doesn’t take forever to start up and then a good GUI library(GTK, QT, etc.).

    My conclusion of good languages to use for desktop apps, are Python, Objective-C, Perl and maybe NodeJS when a good GUI library comes out.

    NodeJS is really good for CLI apps because it’s provides Unix style functions so it feels familiar to writing Bash, and it’s incredibly fast if you know how to use it correctly.

    1: Most consumers have a really low attention span for waiting for something to load/start. Extremely low, 1-3 seconds tops. 
    2: By heavy I mean so many built in features. Java has it’s 3D libraries built in it’s STL, which is a bit much IMO.
    3: C/C++ Isn’t included IMO because you choose what to include plus it’s compiled so runtime is basically barebones.

    PS: These are of course my opinions, so don’t feel like I’m bashing other languages or putting you down or anything. 

  • Greg Banister

    Early in the broadcast I thing it was implied that Dart ONLY compiles down to javascript.  In Chrome Dart runs in its own VM.  And there hasn’t been much adoption of Dart yet because it hasn’t even been released as a product yet.

  • Yarrith Devos

    Well, there is a small difference in JIT-compiled and interpreted languages. The JIT-compiled languages compile the most often used code when the program is opened while an interpreted language compiles every bit of code when it is run. The advantage of the JIT method is better performance (since research indicated most programs run the same bits of code 60-70% of the time) due to not having to compile these parts again, but because it has to compile it when you start the program it will have a slow start up. If pypy has a JIT compiler it probably has better performance than plain python, but it probably has more startup lag as well. To the point of them needing a JRE/Mono runtime installed, most people already have JRE/.NET installed, and if not you can package a JRE with it (I’m not sure how this works with mono/.net, but since .net is a part of windows most people have it preinstalled).  Also, python/gtk on windows has been a real pain to run, and certainly to find an easy way to deploy it through installers. The only thing I got to work after about half an hour was an easy database program that just posted messages to the database and could read them later on.

    I know you’re not bashing any languages, but I’m just trying to show that java has some advantages other languages don’t have. My favorites: easy to keep clean code (python does the opposite for me, easy coding, but messy to read later on), performance close to C, C++ and not too hard to learn. I don’t see the slower startup as an issue for apps that need the extra performance java gives you, just because it can be up to 60x faster than python so the couple seconds boot time are nothing compared to that. If you are writing an app that does some note taking or copies your pictures from an SD to a library on your hard drive you should use something else since it doesn’t need performance and the slow start up is a clear disadvantage.

  • Yarrith Devos

    Actually dart runs in its own VM in dartium (a chromium alpha build with the dart VM) , chrome hasn’t adopted it yet since it’s a preview and not deemed stable enough by google. That being said, it looks like a nice language and I really hope they start rolling it out soon, seems like code in dart would be easier to read and write for me (of course this is because I’m familiar to object-oriented programming since I taught myself java and C++ first).