HNHacker News
TopNewBestAskShowJobs

jestar_jokin

305 karma · joined February 8, 2010

submissionscomments
jestar_jokin··on Open source projects for modern COBOL development
> Most of the COBOL being written today is for maintaining legacy code, not starting new projects.

Funny thing, I worked on a project with a mainframe division, that replaced a crusty old COBOL-based mainframe app with... an RPG mainframe app. In the 2010s. Ostensibly because we could leverage existing knowledge from other divisions under the same parent company, but really because of politics, as these things normally are.

jestar_jokin··on Off the Grid, but Still Online
Why was Tasmania not an option? Lots of remote areas to hide away.
jestar_jokin··on Make Ad-Blocking a Core Feature (Firefox Bug Tracker)
Cute, but never going to happen. Partly due to politics, but also, don't Firefox get revenue for their search bar referrals? I imagine their partners (Google, Amazon) would get stroppy if Mozilla accept the referral money, then actively work to prevent those partners from earning money (via ads).
jestar_jokin··on VOC: A transpiler that converts Python bytecode into Java bytecode
Jython is quite outdated and has stagnated for a long time; support for Python 2.7 was only finalised in May this year. Forget about support for v3.5.

Perhaps by compiling from the bytecode of the existing interpreter, instead writing a whole new source code interpreter for the JVM, it will have some benefits in supporting newer versions of the language. Or, maybe it will help to decouple development of the standard library and the interpreter, possibly letting more devs work on it. You can't really be sure what benefits/deficiencies a different approach will bring until you actually try it - see PyPy, a "silly" idea to implement Python in Python, which now yields faster runtime performance than CPython.

jestar_jokin··on Rules for Good Code
Yes, this is a terrible list. Part of it is the delivery. Most points need more explanation than just "because I say so". If your point is to educate, then don't use aggressive language like "you are already making excuses for doing it wrong"; otherwise, you're just saying "you're doing it wrong, dummy", which by itself is nonconstructive.
jestar_jokin··on N|Solid – Enterprise Node
I recently looked into other realtime monitoring/notification solutions, here's some other options I found:

- New Relic (http://newrelic.com): a well established player.

- Keymetrics I/O (https://keymetrics.io/): makes use of PM2, which is OSS. Seems to have decent plans for small dev shops.

- Nodetime (http://www.appdynamics.com/nodejs/): another option...

Heroku also provides a bunch of monitoring "add-ons" compatible with Node.js.

I guess this solution is different because you don't have to modify your code to enable monitoring.

I'm curious how they intend to crack the Java stranglehold. I guess they intend to build on existing developer mindshare, and make sure ops can support the latest flavour of the month.

jestar_jokin··on JavaScript query language to perform complex object searches
An alternative approach is to use XPath-inspired DSLs that work on JS or JSON object structures. These tend to work on strings, rather than declarative query objects. Examples:

JSPath: https://github.com/dfilatov/jspath

JSONPath: https://github.com/s3u/JSONPath

(Since you don't have type safety in JS, I don't think you lose much by using strings, unless you want to wrap it in TypeScript.)

jestar_jokin··on D-Link publishes code-signing private keys by mistake
Has the problem been fixed? I would think the cat's out of the bag; the private keys are already out in the wild (I assume), so all D-Link hardware is now vulnerable to exploitation.
jestar_jokin··on Ahead-of-time JavaScript compiler
A clever compiler might be able to infer "structural typing", which is basically "duck typing" done at compile time. So, if you add a property "bar" to an object "foo", and you have some other code that calls "baz.bar", you can infer that "foo" is of type "HasABar", and "baz" is of type "HasABar", therefore it might be safe to use "foo" in place of "baz".

The tricky part would be consolidating every structural subtype into cohesive classes.

jestar_jokin··on Ahead-of-time JavaScript compiler
Java compiles to its own bytecode ahead of time. The standard JVM also makes use of JIT to compile hot code paths to machine code.

Python compiles to its own bytecode, but only when a script is first interpreted.

Haxe compiles to many different source code languages ahead of time, including C++, Python, Java, JavaScript, and C#. It also compiles to a custom "Neko VM" bytecode.

So, "compiling" isn't necessarily ahead of time, depending on what level of "compilation" you're talking about.

jestar_jokin··on Ahead-of-time JavaScript compiler
For one, "this" could refer to anything at any time, depending on who invoked the enclosing function.

    function myFunc() {
        console.log(this);
    }
    
    var myObj = {};
    
    // this = window
    myFunc();
    // this = window
    myFunc.apply(null, []);
    // this = myObj
    myFunc.apply(myObj, []);
    
    myObj.myFunc = myFunc;
    // this = myObj
    myObj.myFunc();
    
    var tmpFunc = myObj.myFunc;
    // this = window
    tmpFunc();
Another issues is closures, where variables and properties available to nested functions are dependent on the outer functions. Combined with the floating "this", leads to highly dynamic behaviour which can only be assessed at runtime.
jestar_jokin··on What the IBM Acquisition of StrongLoop Means for the Node.js Community
Agreed. I worked in Lotus Domino for a short while, and it was absolutely amazing for Rapid Application Development of anything that required e-mail and storing documents (or kinda "schemaless" data). It was even supported multiple languages (a declarative "Formula" language, a Visual Basic derived "LotusScipt", and Java(!)).

You could write a decent Lotus Domino app that served up web pages, so users wouldn't have to use the awful Lotus Notes client.

Amusingly, in I think Lotus Notes 8, they revitalised the GUI by replacing it with... Eclipse RCP. Hrmm.

I did witness some monstrosities, though...

jestar_jokin··on How we ended up with microservices
I think "The Mythical Man Month" (1975) calls it a "surgical team". If this practice works, I wonder why it isn't common?

Just postulating here, is it because most established businesses cling to whatever they currently do, and the next generation get their start at those big companies, and copy what they're used to? Or, is it because the people who have the responsibility for organizing teams do not come from a technical background, so miss out on reading material that discusses this?

jestar_jokin··on Node.js v4 Release Timeline
I've thought that if you're going to go the route of compiling to JS, you might as well go to a higher level of abstraction and use something like PureScript, Haxe, or any of the 100 other languages that compile to JS. Of course, interop then becomes a problem.
jestar_jokin··on Node.js v4 Release Timeline
I'm curious, what is your development background, and what do you enjoy most about Node.js?

I come from a Java background, but have been working exclusively with Node.js for the last eight months. Everything I write, I can't help thinking things like "this problem has already been solved in Java many times over", and "this would be safer in a statically typed language", and "this would be faster to write in anything else" (though this is more a reflection on my choice of libs).

jestar_jokin··on Farewell to Flash
If they switched the Flash IDE from ActionScript to Haxe, Adobe could reclaim their lost developer mindshare, and make it enticing to continue using it for 2D games and animations.
jestar_jokin··on Ask HN: Open Source projects an intermediate python programmer can contribute to?
Anything! Contribution is just about process and coordination.

The most important factor limiting most open source project maintainers is time; anything you can do to minimize the time taken to pull your changes will greatly increase the chance of them being accepted.

Make sure you write unit tests for any changes; this is essential to verify that your changes have been tested to work and under what conditions, and helps cut down time for maintainers to review your code.

I'd suggest searching GitHub for Python projects, find one that sparks your interest, then have a look at any outstanding issues (defects or missing features) and see if there's any low-hanging fruit.

jestar_jokin··on Death Threats Against Co-Workers Defeat Employee Disability Discrimination Claim
I think the point is that by this ruling, it might set a precedent where any inability to cope with your job due to stress can be seen as reasonable grounds for termination. I interpreted the bit you quoted as asking, "will there be support and accommodation for stress (of any level), or will exhibiting symptoms of stress be immediate grounds for termination?"

In this particular case, the outcome was fine. In future cases, without threat of violence? Uncertain.

jestar_jokin··on Windows Bridge for iOS
This makes me think of the ol' OS/2 downfall. OS/2 could run Windows applications; this meant no-one developed specifically for OS/2, so they never got the developer mindshare, so there were no OS/2 killer apps, so users saw no benefit to using OS/2 over Windows.
jestar_jokin··on TypeScript vs. Haxe
I've had my eye on Haxe for a long time, and the language has a lot of features that I like - it's cross-paradigm: primarily OO, but good support for functional programming; plus, macros are amazing and can extend the language to do whatever you want.

The project that made me see its potential was "Haxe-WavPack-Decoder", an audio decoder for the WavPack file format. It targets Neko, C++, C#, Java and Javascript. Imagine using Haxe to write reference implementations for file formats (or anything, really), then spitting out implementations for any other target language, so you could include it in a project using any runtime of your choosing.

The problems I see are:

* The language itself is not a high-level wrapper for each platform/target, so you still need to write different code for each platform. (OpenFL/Lime does a great job at handling this for you for games)

* The compiled output might have surprising runtime characteristics. For example, I tried writing an audio rendering app where I targeted C++, and had a naive two-dimensional array (a Vector of Vectors of Floats). When I tried retrieving an inner array, it would attempt to cast the array and its entire contents. This happened every time the array was accessed, and it was accessed multiple times per second. When I flattened the arrays to a single array and used a calculated index, it reduced the processing time from ~30mins to ~5mins.

* You can't necessarily make use of each target language's strengths. For example, I think the Java target does not support annotations.

* If you want to make use of platform libs/tech, you'll need to define externs for each lib. (There's some efforts to use a TypeScript->Haxe converter to convert all of the DefinitelyTyped definitions to externs, so the JS target is looking promising.)

* It seems like a lot of developers come from a Flash/ActionScript background, so there's lots of ports of AS libs with documentation that just says "See the AS lib documentation". This is not helpful for general developers.

* Due to having so many use-cases, it's very hard to share knowledge for "Haxe" - are you looking for info on Haxe for games on desktop, or Haxe for games on HTML5, or Haxe for webapps on PHP, or Haxe for webapps on NodeJS...? This is a tribute to its versatility, but it means the developer mindshare gets splintered into separate tribes.

* Due to targeting other languages, you kind of have to be an expert in that language/platform already, which means you need to translate from the target language to Haxe in your head.

* Since macros can extend the language to do anything else, libraries will splinter based on capabilities and implementations of those capabilities. Some libraries might use an "Optional" macro, some might use "Maybe", and they'll do roughly the same thing but be incompatible.

* I believe libraries written in Haxe can only be distributed as source code, limiting commercial investment in developing libs. (Although, JS also has this problem but doesn't seem to suffered.)

* Still has nulls. :( It does make some efforts to make developers treat nullable values differently, but it seems inconsistent (and probably dependent on target).

jestar_jokin··on The worst impacts of climate change are starting to happen faster than expected
Recycling should be a last resort; "reduce -> reuse -> recycle" is a hierarchy. Plastics aren't really worth recycling due to poor yields.

While climate change is definitely a problem, there are more problems associated with rampant consumption; I'm actually more concerned by plastic pollution. Most plastics break down into tiny particles that get eaten by small and micro-organisms, which inevitably contaminates our food chain. The workaround is to rely even more on industrial farming, making sure to isolate arable farmlands from any organic contamination.

Industrial farming, of course, introduces massive nitrogen run-off, which gets into the oceans, which disrupts those ecosystems and food-chains...

Both climate change and plastic pollution could have been avoided by reducing consumption, but there are too many perceived benefits to the individual and society for people to just stop. And no-one wants to be called a Luddite.

On the plus side, we're in historically one of the longest periods of peace (it might not seem like it, but that's partly because we just got better at distributing information).

jestar_jokin··on RobotJS – Node.js Desktop Automation
As another example, I wrote some scripts (well, hacked together other people's work) to map MIDI CC values to a virtual joystick's Y axis, so I could use my MIDI expression pedal as an accelerator pedal in Euro Truck Simulator 2.
jestar_jokin··on A Well Known but Forgotten Trick: Object Pooling
Possibly true, in the sense that any GCed language suffers in high-performance or soft realtime apps (e.g. games, audio software). However, other constraints might influence the choice of technology, such as existing experience with the available team members, or vendor-mandated technology choices (e.g. Android apps [ignoring the NDK]), or speed-to-market - and therefore development speed - or, debateably, program correctness, is more important.
jestar_jokin··on The Disadvantages of Single Page Applications (2014)
I worked on a project that implemented a SPA with its own tab-based browsing, including nested iframes for some tabs(!). I worked on another projected that implemented a SPA with its own windowing system, because the lead dev thought browser tabs would be too cluttered and users might not know how to use them. (Considering his browser had something like 100 tabs open and he never cleaned them up or opened the existing tabs, I think there was a bit of personal experience colouring his view.)

I think the general issue is that there are existing solutions that avoid the downsides associated with this approach, so this seems like re-inventing the wheel. Yes, needless negativity should be avoided, but so should breathless enthusiasm without due diligence.

jestar_jokin··on Immutable annotations for Java
Another advantage of using annotations to generate code at compile time, is that any (simple) errors get detected at compile time instead of runtime. So, potentially less tests you need to write.
jestar_jokin··on Immutable annotations for Java
Assuming you don't use annotations at all...

* DRY for cross-cutting concerns, like database transactions, logging, dependency injection, serialization, validation, web controllers/endpoints... basically, macros for Java.

* Less code means less chance for error - even if that code was generated at some point in the past, it will need to change in the future, and the future developer may do the change manually and might introduce mistakes. Using annotations can help enforce patterns.

jestar_jokin··on Hash Tables in JavaScript
If you don't mind pulling in the other stuff, Google Closure has provided a Map (hash map/hash table) implementation for a while. You can use the Closure Compiler or ClosureBuilder to ensure you only serve the necessary Closure modules.

https://closure-library.googlecode.com/git-history/docs/clas...

https://developers.google.com/closure/library/docs/closurebu...

jestar_jokin··on ES6: The features I'm most excited about
Maybe I'm misunderstanding, but isn't that the same as static properties on classes in Java?
jestar_jokin··on How Much Does an Experienced Programmer Use Google?
Not related to SO, but FindBugs and PMD for Java are designed to identify potential bugs, based on accumulated knowledge of "gotchas" (e.g. calling "multiply()" on a BigDecimal without assigning it to a new variable - BigDecimal is immutable).
jestar_jokin··on Calculating the intersection area of 3 or more circles
I actually appreciate this post, for showing that people other than myself also over-think solutions. When most of my software development work deals with managing code complexity, vs actual algorithmic work, I often feel silly when I spend too long working on a problem with a simple solution. Luckily, analysis and learning is part of the job description!
← PreviousPage 4 of 6Next →