Slashdot Mirror


User: Pherdnut

Pherdnut's activity in the archive.

Stories
0
Comments
221
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 221

  1. Re:Okay, I get it... on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    Granted, I came up in JS but I've never understood the typing concern devs from other backgrounds have with JS. You learn to work with dynamic types by learning how dynamic types work. In scenarios where I know there's potential for type hijinx like concatenation of strings happening instead of addition I make sure all values are normalized beforehand at some bottle-neck.

    This is not something that's necessary often enough to add all the verbosity and inflexibility of static types in JS. For the most part, dynamic types serve to drastically reduce code bloat and makes overloading for a wide variety of sets of arguments much less of an ordeal. It's much easier to be conscious of what your values are and where they're coming from, IMO, than to lock yourself into a scheme that protects you from yourself. Hell, it might even promote better architectural habits (e.g. policing data at bottlenecks as mentioned above).

  2. Re:I find this useful, ignore the FUD! on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    I think the real problem is that you don't know JS very well.

    I have to write all my getters and setters, as properties/getters/setters

    Arbitrary getters/setters that do nothing but expose a property are as pointless as they are with the property publicly exposed if you aren't handling the requests somehow but no you don't have to expose any object internals as properties to have getters/setters.

    var someObj = new (function SomeObjConstructor(){
    var privateProperty = 'Bob'; //accessed via closure for instances only - not available externally

    this.getPrivateProperty = function(){ return privateProperty; }; //since access is via closure redefining this method externally would deny you access to internals
    this.setPrivateProperty = function(arg){ privateProperty = arg; };
    })()

    Variable lifting/elevating results in seriously ugly var blocks at the top of my functions and causes copy by value in some rather obvious block scopes

    Only globally scoped vars and named functions lift. Most of your vars should not be defined globally. I try to keep it to one for our own library. You can declare vars wherever you damn well please regardless of Crockford's or JSLint's opinion on the matter. Just use 'use strict;' so implicit globals are thwarted. I do tend to declare them up front because I find it aids legibility but I break this heuristic regularly when it makes sense to.

    Fast enumeration (for x in a) doesn't work

    That's like saying if statements don't work. Look it up and figure out what you're doing wrong or check on your object before iteration. This is how it should work:

    for (var x in someObject){ var propertyName = x, propertyValue = someObject[x]; }

    Itterating through ordered keys is painful with associated hashes - you have to create a key enumerator (with pushes! ) each time you want order. jQuery doesn't particularly help.

    jQuery is primarily an adapter/decorator for the DOM API. Why would it help with a data structure issue? In JS you use arrays for sorting and objects for referencing by name. When you need both, wrap an array of objects and give it the methods it needs. Arrays have a powerful sort method you can use to sort by by object property values and you can add methods for looking up by some object property. I'm talking about re-usable stuff that would take me about 5-10 minutes to write in JS.

    Everything runs on the same thread.

    Yes. Design tradeoff and a reasonable one in a functional language, IMO. We do have workers if you're doing lifting so heavy you need to divvy it up but that's usually as sign you have a performance issue elsewhere on the client-side unless you're doing something special.

    Post increments don't work in for loops, for (i = 0; i

    I regularly use pre and post inc/decremetns in all loops. Perhaps they work differently than in the one language you know well. In post-inc/dec operations in JS create a copy, alter the operand they act on but then return the copy. It's the reason the last thing thing i-- evaluates as true is 1 but then on the interior i is zero and then on the net loop it fails:

    var i = someArray.length;
    while(i--){
    doSomething(someArray[i]);
    }

    But seriously, how many core language features are you going to accuse of breaking before you RTFM?

    Prototypical inheritance is pointless key bashing - it pollutes your vision with the use of 'self' everywhere god forbid you miss a one.

    The 'this' keyword has nothing to do with prototypal inheritance. It has everything to do with being able to apply any function to any object as if it were property owned by that object which is a stupid-powerful feature from an architec

  3. Re:Aside from Microsoft's history.... on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    I really don't see what about this to get so up in arms about. Javascript does need improvements, and this is the best approach to that I've seen so far.

    Honestly? I wish people would just !@#$ing learn JS rather than hobble around on crutches that make it more like other languages that most of them never bothered to learn properly either. Also I write a lot of my code straight out of the console fairly frequently. I don't need another layer added to my development process. We've been normalizing for an uneven DOM API for years now. I think we can handle new features without resorting to down-compiling of some other source-syntax.

    It's pathetic. I've been learning this stuff for five years. I've been flown out to silicon valley for interviews where JS was key twice now on the basis of me answering the first tech interview question. In both cases the interviews stopped right there because "nobody had ever been able to answer that one before." One interview was for Netflix. The question? What's the third arg of addEventListener?

    When I mess around with another language, I don't cry because I have to use lambdas to pass functions around or it's just not possible at all. I don't assume I can tweak a class and expect its already-existing instances to change with those tweaks. I don't assume public instance methods are mutable. I read up on the damn language and learn how it works.

    It doesn't help that we have people like Crockford coming up with bizarre reasons to complain about language features arbitrarily. Don't use function constructors because you might forget to use the new keyword? Don't use negating character classes in regEx? Is that BS advice from an expert or ammo for a tool that helps establish him as an authority for lucrative speaking engagements?

    The real problem with JS is that far too many comp sci grads are coming out of college expecting a steady salary while striving to never learn anything they haven't learned already if they can avoid it. Sorry kids, and I'm looking at the Java-uber-alles kids in particular, but that's just not going to fly on the client side. The problem isn't JS. It's you. Yes, you. The dev who only really knows one language beyond basic syntax fluency, and it's probably Java or C#. The dev who thinks the only qualifier for OOP design is putting all his linear procedural code into classes.

  4. Re:CoffeeScript, Dart and this - screw it all on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    Well, dynamic typing might force you to work with smaller teams or get done a lot sooner. There is that issue to consider.

    FYI, every browser has getElementsByClassName now and every browser but IE had it about five years ago. JS is evolving fast. There's also query selectors now that let you grab elements with CSS selectors a la jQuery. Oddly enough IE8 had that but never got className.

  5. Re:Full classes? on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    JS devs who know the language well, do not.

  6. Re:Didn't they do this with JScript? on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    MS has actually been ECMA compliant since IE5 I think. The ECMA spec is just all the core programming constructors like the type factories, Date, Math, etc...

    It's primarily all the W3C spec stuff like the DOM API and CSS standards that they ignored for a decade. They've been slow to adopt the latest ECMA versions since they only do so with new browser versions but for the most part you can count on the core language stuff working as it should as far down as IE6.

    IE9 was supposedly going to rival/best its contemporaries too. When it released it was about half as fast in performance as the rest.

  7. Re:The problem is not with Javascript on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    People who say it's not properly OO don't know what OO is. And no, encapsulation is not data-hiding. Nor are classes a requirement.

  8. Re:Full classes? on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    I'm not really seeing how that analogy works. Prototypal inheritance is newer as a phenomenon than class-based AFAIK. I really don't see what the fuss is though. JS is meant to be highly flexible. That means more granular control over how things work with more mutability and less of the inevitable-idiots-on-excessively-large-teams paradigm. I can do a lot of things with them that I can't with classes and I can emulate classes if I cared to. I've been at it for a few years now, have bothered to become literate in a couple other languages, and I really don't see the massive advantage classes have over prototypal.

  9. Re:Remember the old addage on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    Go have a look at the compatibility tables on quirksmode.org and you tell me who held back client-side web development by a good solid decade on a number of fronts. We could center vertically in all major browsers since 2002ish, except for IE. Not until IE8. Navigator had table display properties back when it was competing with IE6.

    MS did give us XHR and they also gave us innerHTML. All the browser vendors have added new features that ultimately got popular and copied by other browsers and transferred to normalizing specs for future implementation with MS of course not feeling it was necessary to conform to specs that redesigned the API of stuff they invented or stuff they just didn't feel like changing for 10 years, like an event registration model that didn't just write over the same global object for event properties or adding newer obscenely useful native DOM getters that are still the bain of jQuery selector performance for things like $('.someClass') in IE=8

    The problem with MS, is that all they knew how to do was add to what was already there and their idiotic coupling of browser to OS for no good reason that had anything to do with healthy competitive business practices made it impossible for them to update their busted up tightly-coupled-to-other-ms-products-browsers beyond dire security issues so we had to wait for new releases that never managed to get caught up with the curve.

    So yeah, they've kind of been a pain in our asses for 10 years. I'll give them the nod for finally taking the problem seriously starting with IE9 but XHR/Ajax was inevitable and really nothing more fancy than an HTTP request/response mechanism that doesn't refresh the web page. They don't get off the hook for inventing the inevitable.

  10. Or you could just learn JavaScript on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    What cracks me up about all these down-compiled versions is this: What other language can handle this well? JS is insanely flexible. It has some things that could do with an upgrade but if you actually bother to learn to write it well, you'll have no use for any of this down-compiled BS. And yes, it's BS. It does tie you to the original language. Writing/editing down-compiled code would be like trying to write/edit minified code only worse because of all the various ridiculous abstractions they'll be using to add classes where none were needed in the first place. JS is absurdly mutable. And yes it's dynamically typed. This has actually worked very well for web UI devs in part because of it's functional nature and in part because we really can't afford verbosity in order to deal with the sorts of BS a UI dev has to deal with.

    And yes, it's perfectly scalable in spite of these things if you actually give a damn about architecture. It's the first massively popularly-used functional language. It's not going anywhere. Learn it well so you can avoid the crutches and training wheels that will ultimately alienate talent and that you'll regret implementing five years later.

    Brendan Eich made a lot of excellent calls, making Scheme his inspiration in particular, but he's wrong about this rash of down-compiled languages, IMO. They're dead-ends.

  11. Re:I call for web byte-code on TypeScript: Microsoft's Replacement For JavaScript · · Score: 1

    I think adapting a given language to spit out byte-code according to yet another unevenly supported (mostly by Microsoft in the past) spec, is a taller order than you realize.

  12. As Somebody Who is Having a Strong Career Without on Is a Computer Science Degree Worth Getting Anymore? · · Score: 1

    I would say this:

    Some stuff is really hard to self-teach/get exposed to without the degree, but the degree is a waste of money if you weren't really interested to begin-with because ultimately good devs self-teach all the time, long after graduation or their first job that proves they have the chops.

    It is my primary shortcoming as a JavaScript dev who could write books on JavaScript and knows a ton about web-technology/web-UI work that I'm a bit weak in the algorithms department and I often lack the language for relating JS approaches to things to people from other language backgrounds. I'm fine with math. I know how to use ratios. I don't have trouble with math when it gets more complicated, especially geometry/trig-oriented. I write complex regular expressions without having look anything up. I do well at work-avoidance and perf-optimization in more architectural scenarios. But when somebody hits me with one of those node tree questions, I have very little to go on other than instincts honed from working with the DOM API.

    But for the love of assembly, it is a lot harder to find "the good books" on algorithms and general comp. sci concepts than it is to find the good reads on JavaScript or how to handle common CSS layout issues.

    The key benefits of a comp. sci degree, IMO, is exposure to a wide variety of stuff a self-taught dev might never run into by accident, and handy things about the more math/science oriented nature of the field. The problem academia has with putting out decent programmers, IMO, is failure to recognize programming as a heuristic-driven craft where the set-in-stone rules for doing it right can vary wildly depending on the nature of the language itself and the scope of the problems being solved. Also, if you're going to use one language exclusively, Java is a horrible choice, IMO.

  13. Re:OP obviously has not used an SSD before... on Are SSDs Finally Worth the Money? · · Score: 1

    I can only offer anecdotal. Night and day different. Watch YouTube videos of full reboots some time.

  14. Re:SSDs are better in almost every way on Are SSDs Finally Worth the Money? · · Score: 1

    Seconded. I don't know why people are trying to make it more complicated than that. Cost is the only disadvantage unless you need obscenely high capacity. I'm running a 120 with nothing but an external drive for file storage. The difference is night and day. I think it might take longer to wake my laptop from sleep than it does to fully boot my desktop with the SSD.

  15. Re:Will this accelerate Windows 8 Deployments? on Google Kills Apps Support For Internet Explorer 8 · · Score: 1

    Why would anybody test in a browser that's in beta? IE8 dumped a ton of features before releasing.

  16. Re:Taste of their own medicine. on Google Kills Apps Support For Internet Explorer 8 · · Score: 1

    To be fair, MS was one of the earlier large companies to declare they were no longer supporting IE6 and then later 7 IIRC. I have my fair share of web dev rage towards them for the hopelessly out of date browsers we've been forced to support but I think they've been coming to their senses lately.

  17. Re:God damned web applications on Google Kills Apps Support For Internet Explorer 8 · · Score: 1

    Sorry, but I've been a config/support tech at an advertising agency and I'm a web developer. Computer illiterate users (how do these people exist in modern offices?) is no excuse for failing to give access to at least one competent, modern, browser that updates regularly. You can deploy builds with desktop icons that launch web apps in the appropriate browser for the morons and management shouldn't have selected an app that worked in IE-only in the first place. I'm sympathetic to IT essentially being about avoiding blame because the only time they get noticed is when there's blame to assign, but some IT departments take the butt-covering way too far.

    On the flip-side, there's no excuse for web devs to not make simple office productivity services work in at least IE8 (although IE6 and 7 can add more significant development/support costs), but customers shouldn't have the expectation that it will be as pretty or slickly-UI'd as a modern browser that's been updated in the last three years and has a fancy new JIT JS compiler that runs code a LOT faster.

  18. IE8 Was 5-10 Years Behind the Times On Release on Google Kills Apps Support For Internet Explorer 8 · · Score: 1

    Three years is short by browser-support standards but I can see forward-looking reasons why Google wants to make the push sooner than any of us ever did with IEs 6 and 7. Until IE8, IE browsers were a good 10 years behind on conforming to the basic CSS2 spec that Netscape Navigator was supporting around '01-'02 or so. Particularly painful due to this was finding an easy way to center things vertically because we didn't have access to table-display properties for all that time. Seriously. One !@#$ing CSS property and a decade's worth of "trick's to vertically center stuff" blogs because IE couldn't handle that one, most ridiculously simple issue or upgrade their browsers because they'd artificially tied them to their OS nav schemes.

    Now, table-display issue is CSS2, not CSS3 for things like easy rounded corners and other easy-styling details that require setting image backgrounds in order to accomplish in IE8 if management refuses to embrace a progressive enhancement strategy. Chrome, Firefox and Safari have been embracing a large set of forward-looking CSS3 properties (yes for an incomplete spec, note that support is often complete long before specs are officially considered finished) since around '05-07 putting IE8 a good 4-5 years behind when it came.

    But the big reason, the real IE fail in IE8 was the failure to upgrade their damned JavaScript (sorry, "jScript") DOM API to conform to specs that were established at the turn of the millenium. For well over 10 freaking years now, we've been weighing down servers and loading browsers just a little bit more slowly on that first page load for all the extra code required to normalize much of the methods and objects used to manipulate HTML and CSS via JavaScript (jQuery being the dominant tool of choice for this). IE8 also ignored the HTML5 spec so none of the newer tags are available in it, and it still runs its own cheesy proprietary version of the otherwise easily inter-operable canvas API which would have had people talking about Flash's end of days back when Vista launched if MS had tried a little harder to make up for 10 years of neglect in IE8.

    As a web/UI developer who first started tinkering around '05, it is astounding to me how many doors it opens just to not have to support anything below IE8 for a change and IE8 is really only a small step up from IE7 where supporting W3C specs are concerned. IE9 is still quite a bit behind but a massive upgrade relatively speaking. It opens a lot more new doors than all the improvements from IE6-IE8 combined. The problem is, until we get competent judges in the US or Europe manages to completely curb our tech industry's monopolistic designs for us we will always be stuck with IE straying behind until MS is forced to admit the ties between its OSes and browsers are completely artificial and unnecessary.

    What finally got MS to make a serious effort to catch up with modern web standards, IMO, was the speed tests that left them in the dust when other browsers started to update with brand-new JIT compilers for JavaScript which has been a game changer for JS performance. It literally left IE8 in the dust by a factor of 10 and web devs screaming bloody murder at IE may have finally played a factor in getting them to come around.

    IE9 is still the last in the pack but it is a massive improvment over IE8 from a seamless development options and performance standpoint. Anybody with Vista can run IE9. Anybody still insisting on continuing to run in XP or run IE8 in Vista who doesn't have to, deserves to get left behind.

    But seriously, folks, knock it off with the OS/Browser conservatism already. You're supposed to be in tech for god's sake.

  19. Re:But who buys Apple computers ? on 6G iPod & Apple's Future · · Score: 1

    Yikes... Should have the used the preview button on that one before declaring myself a total slashdot noob. The readable version:

    I think you're missing the whole point here. Expandability isn't about tossing aside old parts and replacing them with new ones as an act of hardware elitism. It's so that unlike most modern Apple products, you can upgrade your stuff without throwing the whole silly unit away. I think it's a travesty that you can't even replace iPod batteries.

    I worked as a configuration guy for the IT department of a major advertising agency for a few years. We worked with mac laptops from Lombards up to the last generation before the new intel MacBooks. In my experience every generation of mac laptop got more and more difficult to tweak and upgrade by yourself. Even just Ram.

    It went from simply popping the keyboard off to having to pull out the jeweler's screwdriver kit to remove first just an external cover, then an external cover and some plates, and then having to take the entire battery housing apart. Lombards? You could swap the whole damn CPU out of a daughterboard slot after pulling the keyboard and a small metal cover.

    My girlfriend's Macbook? Screw it. If her RAM goes bad, I'd rather pay Apple than go through the hassle myself after looking through the docs on how to do it.

    As far as quality is concerned, I'd say we were lucky if we didn't end up eating half of our mac laptops on a lease return compared to sending back 95% of our Dell laptops in reasonable condition.

    Granted, there is something to be said for the way a creative is going to treat his laptop and the way your average fearful office person will treat theirs but it was a pretty staggering difference nonetheless. And these were only 2-year leases.

    Why the hate for iPods? They're overpriced. You can buy stuff with dozens more useful features and of much higher quality for half the price of an iPod. Maybe I'm just iChallenged but I never thought iTunes was particularly user friendly and suspect the reason Apple addicts think everything else is so awkward is that they've trained themselves around a broken system in the first place.

    I used to like Apple a lot and I'm pretty indifferent to the OS battles but I think modern Apple fans are suffering from excess brand loyalty and the fashion statement that the Apple/iPod logos have become.

    ---------

    Not all that many people care about expandability. Only the hardcore gamers and geeks who buy the latest-and-greatest cpus and graphics chips really have a use for the kind of expandability that you seem to want. Most people don't know how or don't feel secure swapping their own cpu or graphics card. Even for those who do, it is hard to justify taking out and throwing away a perfectly functional cpu just because it is too old. It doesn't make economic sense. Just like people who buy a new car every other year. The current Macs all have room to expand the RAM, and they can be bought with hard drives that are large enough for any normal consumer. As for the optical drives, the burners in Macs can write to any format that will be mainstream for the next several years. To put it simply: for the vast majority of the computer market, the benefits of having a small and quiet computer completely outweigh the downside of not being able to expand it with pcie cards or extra hard drives.

  20. Re:But who buys Apple computers ? on 6G iPod & Apple's Future · · Score: 1

    I think you're missing the whole point here. Expandability isn't about tossing aside old parts and replacing them with new ones as an act of hardware elitism. It's so that unlike most modern Apple products, you can upgrade your stuff without throwing the whole silly unit away. I think it's a travesty that you can't even replace iPod batteries. I worked as a configuration guy for the IT department of a major advertising agency for a few years. We worked with mac laptops from Lombards up to the last generation before the new intel MacBooks. Every generation of mac laptop got more and more difficult to tweak and upgrade by yourself. Even just Ram. It went from simply popping the keyboard off to having to pull out the jeweler's screwdriver kit to remove first just an external cover, then an external cover and some plates, and then having to take the entire battery housing apart. Lombards? You could swap the whole damn CPU out of a daughterboard slot after pulling the keyboard and a small metal cover. My girlfriend's Macbook? Screw it. If her RAM goes bad, I'd rather pay Apple than go through the hassle myself after looking through the docs on it. As far as quality is concerned, I'd say we were lucky if we didn't end up eating half of our mac laptops on a lease return compared to sending back 95% of our Dell laptops in reasonable condition. Granted, there is something to be said for the way a creative is going to treat his laptop and the way your average fearful office person will treat theirs but it was a pretty staggering difference nonetheless. And these were only 2-year leases. Why the hate for iPods? They're overpriced. You can buy stuff with dozens more useful features and of much higher quality for half the price of an iPod. Maybe I'm just iChallenged but I never thought iTunes was particularly user friendly and suspect the reason Apple addicts think everything else is so awkward is that they've trained themselves around a broken system in the first place. I used to like Apple a lot and I'm pretty indifferent to the OS battles but I think modern Apple fans are suffering from excess brand loyalty and the fashion statement that the Apple/iPod logos have become. --------- Not all that many people care about expandability. Only the hardcore gamers and geeks who buy the latest-and-greatest cpus and graphics chips really have a use for the kind of expandability that you seem to want. Most people don't know how or don't feel secure swapping their own cpu or graphics card. Even for those who do, it is hard to justify taking out and throwing away a perfectly functional cpu just because it is too old. It doesn't make economic sense. Just like people who buy a new car every other year. The current Macs all have room to expand the RAM, and they can be bought with hard drives that are large enough for any normal consumer. As for the optical drives, the burners in Macs can write to any format that will be mainstream for the next several years. To put it simply: for the vast majority of the computer market, the benefits of having a small and quiet computer completely outweigh the downside of not being able to expand it with pcie cards or extra hard drives.

  21. Re:Not really art on The Epic Ebert Videogame Debate · · Score: 1

    Look, if an Adam Sandler movie is art, an FPS is art. The reason people are getting huffy is because Ebert and friends are trying to dismiss an entire genre of media as art or "not art." It's like pointing at escapist novels and saying, "those aren't Art with a capital A" so no books will ever be art. In any case, video games are their own media. Just like books, periodicals, television, movies, paintings, and what-have-you. Whether that makes them have art, actually be art, or somehow be associated with art is up to how you feel about the other forms of media. Are all books are art? No, of course not. How about all fiction though? Just because its bad, easy, or tainted with the sin of made-for-mass-consumption doesn't mean it's not art. I personally think fanboy favorite, FFVII, was more like touring an art gallery than actually playing a game and that's not to say I didn't like it. It just had all the replay value of revisiting the same art gallery over and over again.