16 ms·
The IRS’s Effort to Convert Its Assembly Codebase to Java
- zitterbewegung 9y agoThe best argument to new development is working code. I assume that they can't hire people to upgrade or maintain Maniframe software anymore.
- warrenm 9y agoThey've got a decent team that manages their mainframe systems
- cosmie 9y agoWorking code is king, but in the IRS's case it's a very expensive king. A huge amount of fraud happens by exploiting a timing attack against the batch processing architecture of the existing process. The system only has visibility into data from previous batches, it's blind to what's been done during the the currently processing batch. One exploitable artifact of this is that if you try to claim someone as a dependent (and potentially get child tax credits, EIC, etc) and they've already been claimed in a previous batch, your return will get rightfully rejected. But if multiple returns claim that person in the same batch, and they haven't been claimed in a previous batch, they'll all get accepted. The IRS will catch it after the fact, but by that point they've already paid out the fraudulent returns. If it's something like a misunderstanding between spouses on who claims a kid, it's likely they'll straighten it out and get their money back. If it's outright fraud, then they'll probably be out that money completely (plus investigative costs). That's just one example, but there are billions of dollars worth of fraud that happens every year which could be prevented by migrating the IRS systems from offline batch processing to an online/real-time transactional architecture.
- warrenm 9y agoTheir batch processing is definitely an interesting case, as it how it processes failures (had them as a customer of mine a couple years back where I was working on improving their responses to failed jobs (and accelerating the time between reruns)).
- dethswatch 9y ago>assembler-to-Java project Where's my gif of that guy who looks skeptically at that thing he's looking at? You know that one.
- v64 9y agohttps://i.imgur.com/dqPq0wI.gif https://i.imgur.com/dqPq0wI.gif
- dang 9y agoPlease don't do this here.
- chrisbennet 9y agoHere you go: https://memegenerator.net/instance/81318657/futuram-psychology-assembler-to-java-project https://memegenerator.net/instance/81318657/futuram-psycholo... (Squinting Fry from Futurama)
- cdelsolar 9y agoHumor isn't allowed on Hacker News, you should know better.
- phaemon 9y agoOf course it is. The most points I've ever got for a single post, were for a one-line joke. But then, my joke was funny.
- monksy 9y agoJust imagine if this new system was converted to groovy or scala. That would be pretty amazing.
- _asummers 9y agoAre people writing new non-Jenkins Groovy code in 2018? What's the use case? Legitimately curious. My experience with Groovy is always frustration and I liken it to the Coffeescript of Java.
- tikkabhuna 9y agoGradle plugins? I wouldn't choose it over Java full time but it has some niceties like multi-line strings to help with testing.
- Larrikin 9y agoThose can be written in Kotlin now.
- twic 9y agoYou can write the plugins themselves in Java, and so i assume in any JVM language. Having written a few, i prefer Java to Groovy, as the Gradle API (SPI?) is pretty complicated, and it's reassuring to have my use of it typechecked. It's Gradle build scripts themselves that can now be written in Kotlin instead of Groovy. I haven't tried that yet, but it sounds pretty fresh.
- derherrf 9y agoWe use it for an embedded DSL to describe business logic quite successfully. Easily extendable via categories and embeds naturally in a larger JVM application. And there is Gradle.
- _asummers 9y agoTotally forgot about Gradle. Fair enough!
- rnestler 9y ago> Assembler is like Shakespearean English. It’s dated. A shrinking number of people can deal with it. But it’s also elegant and highly functional. What is considered elegant and functional about assembly?
- TheSoftwareGuy 9y agoI've always thought the formatting kind of lends itself to a little bit of visual elegance. Since its always 1 instruction per line, various instruction fields tend to line up nicely. But yeah I don't see how it is elegant in any way that's useful
- zmonx 9y agoAlthough it may appear a bit surprising at first, assembly language is homoiconic in the sense that you can easily reason about the program code within the language: It is easy to reason about bytes in assembler language, and compiled assembler code is just a sequence of bytes. This is similar to high-level languages like Lisp and Prolog, whose code is readily represented by built-in data structures in the respective language. A fun fact about this is that extremely low-level (like assembly) and extremely high-level (like Prolog) languages are homoiconic, but there is a large gap "in the middle" (like Java, C), where there are many languages that lack this property.
- DonHopkins 9y ago6502 assembly is one of the sharpest smoothest most beautiful assembly languages, because all the opcodes are three letters long, so it doesn't have a jagged serrated right edge like most other assembly languages. Much less friction!
- whataretensors 9y ago> Assembler is like Shakespearean English. Author has no idea what assembler is.
- anta40 9y agoProbably he's not a programmer?
- nvahalik 9y agoSounds like a great reason to simplify our tax system!
- TimJYoung 9y agoWow, what a cool project to work on: working out the logic flows in assembler and breaking them out so that they can be translated into a higher-level language. I've always thought that this type of government work should be open to bids from anyone. If the government is worried about trojans, malware, etc., then they can easily hire an auditor to audit the code and vouch for its authenticity. The fact that only very large, well-connected corporations get a crack at these types of problems is insane and a complete waste of taxpayer money.
- jacquesm 9y agoThe big trick is the proposal itself. Writing that is only possible if you are already tied in at all kinds of levels. I've seen some of these tenders up close, the companies that land the deals submit phone book sized proposals to tenders that are officially open but actually closed unless you are in a very select circle already. It's not uncommon for the proposal writer to then pass on the actual work to a whole slew of subcontractors at substantially lower rates.
- ryanmarsh 9y agoAre you saying this is how contracts are awarded on FedBiz Ops? I know a handful of small players, myself included who have won IT contracts with the gov't and it is not at all like you stated.
- jacquesm 9y agoSmall contracts are an entirely different matter. Try bagging something >> $1M or defense related. I've worked for the government on small jobs here in the EU a couple of times, as long as you stay below a certain amount you can bypass a ton of requirements. But once you go above that threshold the number of players drops very rapidly and there is no escaping the formal process. If you are capable of selling large contracts to the US Federal Government without having to submit a typical bid proposal then you are in a very fortunate position, but the people that I know that have done this in the past have all worked on stuff that either required their fairly unique skills or they were working on extremely small contracts (< $250K).
- jimrandomh 9y ago> Wang was working under streamlined critical pay authority the agency has had since its landmark 1998 restructuring. It gave the IRS 40 slots under which it could pay temporary, full-time employees higher than GS rates. Former Commissioner John Koskinen pointed out Congress did not re-up this authority in 2013, despite his entreaties to former Congressman Jason Chaffetz’s Committee on Oversight and Government Reform. > He says he applied to become a GS-15 or Senior Executive Service member so he could see through the assembler-to-Java project. But his approval didn’t come through until a week before his employment authority expired. By then he’d accepted another job. (GS-15 is $103k-$134k. https://www.federalpay.org/gs/2017/GS-15 https://www.federalpay.org/gs/2017/GS-15) So, basically: the IRS can't fix its software because it can't pay market rates for software engineers. It can't pay market rates for software engineers not because it lacks the budget for it, but because Congress won't let them. This is how it ends up with huge armies of bureaucrats doing things that could be easily automated.
- dsfyu404ed 9y ago"armies of bureaucrats doing things that could easily be automates" = "jobs for people who you owe favors but don't want to put in a position where they might screw up something important" Elected officials have little incentive to make governing any more efficient. Bureaucrats themselves have some incentive to be more efficient because then they can spend more of their budget at their discretion.
- hansjorg 9y ago> This is how it ends up with huge armies of bureaucrats doing things that could be easily automated. Less bureaucracy and lower costs sounds like something anyone would agree on, but remember that a large part of congress has run on anti-tax promises. Hampering the efficiency of the IRS is one way of making good on that.
- ryanmarsh 9y agoThis is not a partisan issue. Both parties have a long history of meddling with the IRS and generally making things worse.
- CryoLogic 9y agoFunny how it's always the same companies producing code for the government based on political relationships - but the outcome of government software is always so bad.
- dsfyu404ed 9y agoPolitical relationships aren't the entire problem. You have to be a BigCo with an established relationship with the government to be able to comply with the rules and lobby for a contract that favors you. If anyone could land a contract just because a senator owed them a favor you'd see a lot more diversity in who the government does business with.
- dajohnson89 9y agoDoes anyone know who is the prime contractor for this particular engagement?
- CyberDildonics 9y agoJava? Hope they don't need an unsigned byte.
- TheSoftwareGuy 9y agoJava seems like a good choice for the IRS. There are legions and legions of programmers well versed in Java, since its among the most commonly used programming languages to introduce programming at universities. This means the IRS should be able to focus its hiring on "People who know tax law and can use Java" instead of "Java experts that know enough tax law to be dangerous". Its not the flashiest language, but I think its the right choice for them.
- ryanmarsh 9y agoIts not the flashiest language so I think its the right choice for them. FTFY
- bpicolo 9y agoSeems unlikely that they can hire many cross functional tax-law-programmers. You integrate teams so there are experts on both.
- TheSoftwareGuy 9y agoMaybe, but my line of thinking is that it could be easier and better to teach tax law specialists a little bit of Java, than the other way around
- warrenm 9y agoWhat makes you think the developers have to "know tax law"? It might be a peripheral plus for an applicant, but it's more important they are a competent programmer. "Tax law" changes constantly - you truly cannot reasonably expect a developer to "know tax law" and be a competent programmer.
- chii 9y agoby "know tax law", I'd assume they mean the same thing as know react - that is, they have experience doing it previously.
- TheCoelacanth 9y ago
- mooneater 9y ago> Converting assembler code won’t be such a simple input-output matter [as turning a dog into a sausage and back again as shown in the linked b/w film] Actually this is the best analogy I could possibly imagine.
- gregoriol 9y agoIt's quite simple actually: just make very long names for everything, instead of very short ones.
- monocasa 9y ago> in theory, there’s no way to translate assembler code. They way it runs is not how it reads Wat?
- anfilt 9y agoOh wow the article says that. "It does not run how it reads really..." that is the polar opposite of assembly. Compiled languages are more likely do thing under the head you don't expect especially a language ran in VM with garbage collection like Java. Also Java why? I would not trust a language system dependent oracle. The days of Sun Microsystems is sadly gone. =(
- pavel_lishin 9y agojhayward elsewhere in these comments explains what they might mean: https://news.ycombinator.com/item?id=16378486 https://news.ycombinator.com/item?id=16378486
- slededit 9y agoIf you do crazy "tricks" to get the space down like self modifying code or jumping into data then it won't run how it reads. It's a lot easier to do this in assembly because data and code aren't distinct.
- monocasa 9y agos360 has a lot of cool features for self modifying code like the 'ex' instruction. That tends to point out exactly what's happening when you read it. https://en.wikibooks.org/wiki/360_Assembly/360_Instructions/EX https://en.wikibooks.org/wiki/360_Assembly/360_Instructions/...
- tzs 9y agoOn the other hands, there are some "tricks" that someone trying to duplicate that functionality in a higher level language can do, too. For example, our computers nowadays are much faster and have much more memory. So suppose you have some long, tricky section of assembly code that you know computers some sort of function of a single 32-bit input. You could simply run that section, in a simulator, with all possible 32-bit inputs and make a table of the results. Then instead of trying to understand what is going on by following the convoluted assembly, your task is to implement the function given by that table. With the function in table form you can do things like look for sections that are linear, or constant, of follow other common patterns. Hopefully you can get some idea from context in the assembly code what, at a high level, the function is doing, and that should further help you see patterns in the table.
- hnaccy 9y agoIf you machine translate assembler to Java won't you still end up with confusing code?
- zmonx 9y agoYes, very much so. In addition, some of the automated translators I have seen also apply automated refactoring: They tend to merge similar sections of code and minimize the delta (similar to diff) that is factored out. This can create a maintenance problem especially in the context of a system like the IRS's, where presumably the code that performs calculations for different years or other periods (legislations etc.) is similar but not identical, but must be retained as fully as possible to reliably perform calculations that are subject to earlier regulations. Such portions of code should be kept distinct, but an automated conversion may conflate them, and it may require additional and error-prone fiddling to enforce the separation.
- test6554 9y agoI feel like if the IRS had a software provider that was privatized, this would not be an issue.
- jladd 9y agoSo the IRS is going to "modernize" by converting to a language that has already far outlived its useful life?
- AlexCoventry 9y agoIt sounds like the effort might have been a step in the right direction, but hardly a solution in its own right. The result would be a literal case of the aphorism "You can write assembly in any language." The translation would have some minor benefits: interop with java libraries would be nice, it could help to plug the system into better infrastructure like a modern testing framework, and it might run a little more securely. (I wonder whether you could craft a tax return to crash this system.) But it wouldn't have magically produced readable modern java code.
- fwip 9y agoIf you can separate areas of functionality, you can upgrade it piece-by-piece. So while it starts off as 98% inscrutable assembly-in-Java, you transform it over time until it's only 2%. Ideally, backed with strong tests and fuzzing.
- AlexCoventry 9y agoAbsolutely, but it's a long way from a solution.
- codemusings 9y agoOne has to wonder whether it really makes sense to port instead of taking a look at the workflow and simply implement it from scratch.
- nicolaslem 9y agoI maintain a code base written by others and I fight this feeling all the time. If (re)writing software has taught me anything is that sentences that start with "simply" or "just" actually mean that you don't fully understand the problem.
- dajohnson89 9y agoTo be fair, there's a tendency to fight starting from scratch, on the (arguably incorrect) assumption that starting over introduces higher risk, and greater time & cost.
- TheCoelacanth 9y agoIMO, all-at-once rewrites are almost never a good option. Ship of Theseus style rewrites where every component eventually gets replaced but there is never a hard dividing line between old product and new product can be a good idea.
- warrenm 9y ago"simply implement" may be an understatement, but often enough, rewriting/reimplementing IS simpler (and cleaner, and more maintainable, etc etc etc) than keeping a legacy system going
- throwa32582657 9y agoI’m sorry but this seems like a fool’s errand. Perhaps Jian Wang is a genius that figured out a way to map IBM 360 assembly to Java that would map to the JVM. Maybe he’s brilliant or maybe his efforts are overhyped by this news piece. It seems that a direct mapping from 360 to the JVM might have made more sense. I suggest that you go look at Rick Hickey’s Clojure code to see how that might look. Government IT is rife with corruption and incompetence. I have worked for a number of agencies and worked in federal government for many years. Projects are often steered in the direction of contractors and federal employees that benefit from technologies. This is often done to bias incumbent legacy stakeholders and technologies that benefit the federal employees and the contractors that collude to control the systems for their own gains. I have seen the sleaziest contractors enrich themselves at SV IPO levels. Then came 18F, the hipster government IT revolution. As a senior developer, and maybe I am just some cranky old developer, but the thought of being vetted by this douchebag, fuckin blows my mind: https://18f.gsa.gov/2015/04/08/day-in-the-life-of-talent-manager/ https://18f.gsa.gov/2015/04/08/day-in-the-life-of-talent-man... Yep, most government and corporate IT is fucked.
- deleted 9y ago[deleted]
- jmclnx 9y agoWell, I guess once the system is rewritten, we will not get our refunds until 3 years later. I wonder if I get 2x by expected refund the IRS can come at me to claim the extra amount :)
- tytytytytytytyt 9y agoWow, that joke would have been hilarious back in 2000.
- chx 9y agoWhat this article implies is not entirely correct: this codebase is not S/370 assembly, oh no. It's IBM 7074! Check also the reports which said the Master File age was over 55 years -- the S/370 is too new for that. https://books.google.ca/books?id=3iEDAAAAMBAJ&pg=PA88&lpg=PA88&dq=%22IBM+7074%22+%22irs%22&source=bl&ots=A_DZmgVBL7&sig=2cAXb5oG_JypmSU_jCa5fqbPqaY&hl=en&sa=X&ved=0ahUKEwjpvuvM2qbZAhVGwWMKHdbXA0YQ6AEINjAD#v=onepage&q=%22IBM%207074%22%20%22irs%22&f=false https://books.google.ca/books?id=3iEDAAAAMBAJ&pg=PA88&lpg=PA...
- lobster_johnson 9y agoThere was an interesting article/HN story a year ago about the government working Java into an ancient IBM 7074 system: https://thenewstack.io/happens-use-java-1960-ibm-mainframe/ https://thenewstack.io/happens-use-java-1960-ibm-mainframe/ HN discussion here: https://news.ycombinator.com/item?id=13464675 https://news.ycombinator.com/item?id=13464675
- crb002 9y agoOr rewrite it in LLVM.
- nice_byte 9y ago> assembler > elegant > functional Good one, mate