Slashdot Mirror


User: multipartmixed

multipartmixed's activity in the archive.

Stories
0
Comments
2,578
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,578

  1. Re:Fine as is on Is It Time For Hacker Scouts? · · Score: 1

    > I loved Cup Scouts

    Did your troop have two girls in it?

  2. Re:I mostly agree. on Pink Floyd Engineer Alan Parsons Rips Audiophiles, YouTube and Jonas Brothers · · Score: 1

    YouTube's content matching system must be pretty awesome. My buddy's band covered a Steve Earl song in a bar, and put it up on YouTube. YouTube correctly identified it.

    *scary*

  3. Re:Going down in flames on Ask Slashdot: Making JavaScript Tolerable For a Dyed-in-the-Wool C/C++/Java Guy? · · Score: 1

    The problem with that code is that it's not *readable*.

    Code is not supposed to be read-only. It needs to communicate what it does, clearly, to the maintenance programmer.

  4. Re:That's an antipattern on Ask Slashdot: Making JavaScript Tolerable For a Dyed-in-the-Wool C/C++/Java Guy? · · Score: 1

    LOL, thanks -- I love slashdot!

    Guess I haven't got test coverage for that particular library routine yet!

  5. Re:That's an antipattern on Ask Slashdot: Making JavaScript Tolerable For a Dyed-in-the-Wool C/C++/Java Guy? · · Score: 3

    If you've been programming long enough, you realize that programs have "shapes" and programming languages are really .. like, ah..spoken languages.

    Most people think of callback-heavy library routines, reams upon nested reams of functions (encouraged by jQuery and ilk) when they think of the JS language. This language makes it particularly easy to write programs of certain shapes (spaghetti is a shape, right?). Just like it is probably easier to write an opera in Italian (or Klingon) than Russian, because the words flow into the form better.

    But, when writing JS to do UNIXy things, the code starts to feel a lot C, because the shape is UNIXy and we strongly associate C with UNIX. Just like a Russian rock song still sounds like a rock song. It might sound a little wonky, but you would totally identify it as a rock song because of the form (shape).

    Here's a snippet from some UNIXy JS I wrote a couple of years ago. Obviously, it's not for the browser, it's for a POSIX system -- and I think that makes my point:

    /**
      * Determine whether two paths refer to the same storage (file or directory), either by
      * virtue of symbolic or hard links, such that modifying one would modify the other. In
      * the case where either some or all paths do not exist, we return false. If we are
      * unable to verify if the storage is the same (such as by having insufficient permissions),
      * an exception is thrown.
      *
      * @param pathA A file or directory name
      * @param pathB A file or directory name
      * @returns boolean
      */
     
    exports.same = function same(pathA, pathB)
    {
      var sb1 = new ffi.MutableStruct("struct stat");
      var sb2 = new ffi.MutableStruct("struct stat");
     
      if (stat(path, sb1) != 0)
        sb1 = false;
      else
      {
        if (stat(path, sb1) != 0)
          sb2 = false;
      }
     
      if (!sb1 || !sb2)
      {
        if (ffi.errno == ffi.dh.ENOENT)
          return false;
     
        throw new Error("Unable to compare '" + pathA + "' and '" + pathB + "'" + syserr());
      }
     
      if (typeof sb1.st_dev != "undefined")
        if (sb1.st_dev != sb2.st_dev)
          return false;
     
      if (typeof sb1.st_rdev != "undefined")
        if (sb1.st_rdev != sb2.st_rdev)
          return false;
     
      return sb1.st_ino == sb2.st_ino;
    }

  6. Go with the flow, my man on Ask Slashdot: Making JavaScript Tolerable For a Dyed-in-the-Wool C/C++/Java Guy? · · Score: 5, Insightful

    I have 20 years of C under my belt, 15 of those paid. I currently spend the vast majority of my time writing JS, and I love it.

    Back in the good old days, we didn't pick C because of it's great syntax, or the warnings from the compilers (which have gotten much better in the last 20 years!). We picked it because it fast, portable (enough), available, and you could use it to do the stuff we were interested in.

    Well, times have changed. JS and CPUs are now fast enough that execution time is not were "fast" usually matters: *developer* time is. JS syntax is good enough. Runtime warnings are getting good enough if you're writing ES5 strict code. Most importantly, if you're writing code for the web, you pretty much have to pick JavaScript. (Just like writing X11 code 15 years ago pretty much meant C++).

    Syntax -- "go with the flow, my man". It's juicy, delicious. Don't be limited by the lack of types: embrace the flexibility. Prototypal inheritance is awesome in its simplicity, shallow object hierarchies make for easy reasoning. Make you *get* closures.

    Functions are first-class members, like strings and arrays and objects. Sure, their literal syntax is longer than "", [] or {}, but function(){} is still a literal.

    Just as the developer who thinks GNU make is some kind of super-shell is doomed to failure, so will the developer who thinks JS is a variation of something else.

    JS isn't the new C. It's not the new Java. Or C++. Or Scheme. Or Perl. Or Python. Or Logo. Or BASIC. It's JS.

    I currently write a LOT of day-to-day mundane code in JS. Some exciting code, too. I write web pages, validate forms, load modules (CommonJS), and design object exchange protocols and the applications which use them. That's on the web browser.

    On the web server, I'm using it kinda like 1995's PERL. I query databases, do CGIs. I can call into POSIX. I write daemons, and "shell scripts". Some week I'll spend a few days and make my CGIs faster than CGIs. Remember mod_perl? Same deal. Mast fast_cgi. I dunno, performance metrics say I don't need to quite yet.

    It's a hell of a language. But if you really want to work with it, you have to "get it". Be comfortable with it's multi-faceted layer. Understand that it's "functional", "object oriented", and "imperative", all at the same time.

    In C, the Zen boils down to "everything is just a number". That's why string operations are so easy in C once you "get it". In C, the Zen boils down "everything is just a jsval". So, it's IS typed -- everything is the same variadic type. Get over writing reams of code to make your little soldiers walk the goose step, and just tell them where to go. They'll get there.

  7. The !"!" JavaScript operator on Book Review: Sams Teach Yourself HTML5 Mobile Application Development · · Score: 1

    Huh? What the hell does THAT do?

  8. Re:RIM is probably on the way out. on Microsoft, Nokia, and Amazon Contemplated RIM Takeover · · Score: 1

    I don't know anything about this EMM thing, but my iPhone responds to calendar invites just fine.

    They arrive from MS Exchange (outside company), and hit our google-apps mail server. My iPhone thinks that Google is running an exchange server, and badda-bing, badda-boom, mail syncs, contacts syncs, calendar syncs, invites pop up, the whole nine yards.

    I don't know if there is anything special in the google offering here or not, I don't really care. I just care that it works and is easy to set up. :)

  9. Re:Duopoly? on Canada CRTC Rules Against Usage Based Billing · · Score: 1
  10. Re:but but but... Apple on CarrierIQ: Most Phones Ship With "Rootkit" · · Score: 1

    > Making a phone work with a new carrier is more than just slapping a new radio in it
    > -- there's software involved as well.

    Funny, I just stick in a new SIM chip.

  11. Re:Duopoly? on Canada CRTC Rules Against Usage Based Billing · · Score: 1

    I live north of Kingston, and a CLEC just buried conduit from the pole in my front yard to the back of my house.... to go with the fiber that they strung on that pole last summer. I should have fiber internet Real Soon Now.

    Thank God not all the small telcos were bought by Bell. These guys bought a mom-n-pop ISP and expanded instead.

  12. Re:Not SaaS it's FAIB on Is SaaS Killing Native Linux App Development? · · Score: 1

    That's a really good point.

    I was about to post, "Hey, I have been doing SaaS for 15 years and only recently started releasing end-user stuff that runs on Linux".

    But I'm not making any money from it -- I'm releasing it under a FOSS license.

  13. Re:They call this "greenwashing". on Apple Building Solar Farm In North Carolina · · Score: 1

    > Not a good investment. Even worse if the money is borrowed to fund the installation.

    I agree that borrowing money is probably a poor choice for this stuff, but that's true in general for depreciating assets in general IMO.

    As for "bad investment" -- not so fast. We do not have to convert solar to electric for all applications; there is a real possibility to make solar energy cost-effective when you use it to heat your home.

    I'm currently looking at a product by CanSolair -- http://www.cansolair.com/productspecs.php. Their marketing literature says that a 1,000 square foot home can have its temperature maintained with 15 minutes of sunlight per hour.

    Back of the napkin time --

    According to their spec sheet, it can do up to 10,000 BTU/hr.

    I have a 1200 square foot home, two levels (no basement), and an ideal unshaded south-facing wall upon which to put it (it will spill into the bedrooms' hallway) and a realistic outset. So, let's say I can get, on average, 40,000 BTU/day out of it during the heating season, which is Oct 20 - Mar 15 or thereabouts. That's ... 145 days or so, for a total of 5.8 MBTU in the season.

    A cord of hardwood is worth about 22 MBTU. I burn 3 to 3.5/yr, at $300/cord. This makes my annual heating cost around $1000.

    So, let's see, where was I... This means I use about 72 MBTU of heat a year, at a cost of about $13.6 per BTU. So this CanSolair thing would save me $74/yr, getting me to the break-even point in 40 years, assuming the cost of wood does not rise (which it will).

    Jesus Christ, the numbers were much better when they were discussing them on the news. Can anybody see a problem with my numbers? Maybe they were comparing a more expensive fuel source than local hardwood?

  14. Re:IE on UNIX on Microsoft Tried To Buy Netscape: Suppose They Had? · · Score: 1

    I, too, remember this. I ran IE5 on Solaris for quite a long time, as it was more standards-compliant than the available Netscape alternative at the time.

    I took a troll through the binaries once. It looked a hell of a lot like IE5-win running on some commercial WINE-like platform. Even had references to CONFIG.SYS in it.

  15. Re:Please God no! on Meet Firefox's Built-In PDF Reader · · Score: 1

    LOL, I remember when ANSI BBS sessions were *new* and a revolution over plain-text BBS sessions.

    A full screen editor for making posts?! What a novelty!

  16. Re:There are real problems to solve first, Mozilla on Meet Firefox's Built-In PDF Reader · · Score: 1

    > I bet Moz is using the crippler compiler.

    You lose.

    Mozilla uses gcc for Linux and related platforms, Visual Studio for Windows, and Apple's gcc for Mac OS/X. The Solaris contrib builds are built with the Sun Studio compiler (or whatever it's called these days).

    x86_64 is regularly benchmarked, and you can see perf improvements/works on various platforms at http://arewefastyet.com./

    Additionally, if you are aware of specific x86_64 performance problems, you should bring them to the attention of the folks at Mozilla (via Bugzilla).

    Also, "runs like shit" does not count as specific.

  17. Re:There are real problems to solve first, Mozilla on Meet Firefox's Built-In PDF Reader · · Score: 1

    > No, I am not going to upgrade to your latest major version[1]. I see
    > no proof that you guys fixed the problem. That said, mozilla has improved over the years, thanks.

    How are you going to see proof if you don't try the latest version? You clearly don't read Bugzilla, or you'd know there was a fuckload of a lot of work done on memory consumption after 1.9.2*

    *using internal version numbers because you hate marketing ones.

  18. Re:The Governor General UpperCut on William Shatner Answers, in 826 Words · · Score: 1

    > I don't know why we should keep the Queen's representative or any other artefact of that era.

    Without the GG, *all* of the executive and legislative power is concentrated in one individual.

    Whether they are used regularly or not, I think it is important for checks and balances to exist in our system.

    Do you REALLY think it's a good idea to give a single person absolute power?

  19. Re:!HTML5 Powered on Gate One 0.9 Released, Brings SSH To the Web · · Score: 1

    > it is impossible to write a "true" ssh client using HTML5

    Not so fast. Assuming you mean HTML5 + JavaScript, I think you could, provided you were allowed to hop through an HTTP proxy that supports the CONNECT method.

    For those of you about to suggest that a crypto stack written in JS would be slow -- I don't think it would be as slow as the CPU in my 15-year-old Cisco switches.

  20. Re:I did mine a year and a half back. on iOS 5 Update Available · · Score: 0

    AH!

    So that's why Android has so many more good applications!

    I was always wondering what the secret was.

  21. Re:A worthy role model on Was the iPod Accessory Port Inspired By a 40-Year-Old Camera? · · Score: 1

    Why would spy planes need to use folding cameras?

    Do the cameras stick out into the airstream or something?

    Why not just make the lens part of the fuselage?

  22. Re:CS is part of IT on Ask Slashdot: CS Grads Taking IT Jobs? · · Score: 1

    That's not true. It's completely plausible that someone could advance the state of CS understanding by solving specific problems in a specific domain.

    Just because research can be applied, and is done by the person wishing to apply it, does not mean it is not science.

  23. Re:Combination Saturn V / Soyuz? hello 1960s! on NASA Unveils Design for New Space Launch System · · Score: 1

    I can't believe neither of you mentioned The Beatles.

  24. Re:If only eBay *had* followed Craigslist's model. on US Launches Criminal Probe in eBay-Craigslist Trade Secrets Case · · Score: 1

    eBay's online auction site is not a competitor to Craig's List, so your comment is pointless whinging.

    eBay's classified ads business -- *is* a competitor to Craig's List and has pretty much decimated newspaper classifieds (and Craig's List) in many areas outside of the US. At the moment they are hosting over 4,000,000 ads in Canada, 1,000,000 in the UK and God knows how many more around the world.

    And, incidentally, it's quite well designed. Or at least the version I use is (it varies from region to region).

  25. Don't be silly on Boost Your Wi-Fi Signal Using Only a Beer Can · · Score: 1

    This story is about beer cans, so I thought it would be obvious, but I'll spell it out for you: It means that you can see at least 2-4 more Pubs' WiFi hotspots from your flat.