3 ms·
My one regret in a project at work (internal tool) was that I didn't persuade management to let me use an embedded prolog in the application. Instead I rewrote
by Jtsummers 10y ago
My one regret in a project at work (internal tool) was that I didn't persuade management to let me use an embedded prolog in the application. Instead I rewrote half of Prolog (badly) in C#.
- andai 10y agoI don't get it. Isn't that the same thing but worse? Edit: Also, Greenspun's Tenth Rule of Programming: Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
- Jtsummers 10y agoIt was worse. That office had an aversion to anything not-Microsoft for dev tools unless they were for the embedded systems we maintained. They also had an aversion to any language that wasn't "industry standard", whatever that meant (because, clearly, prolog and others do have industry standards associated with them; here they meant commonly used and easy to hire for).
- julian_1 10y agoThis is a frustration of mine. At university they try to install a knowledge of all kinds of crazy languages, before you're ready to appreciate their value and the issues they attempt to address. The most glaring example is probably teaching Haskell in first-year. As a working programmer, you're then corralled into following prescriptive industry-practice - that always errs on the side of dumbing down the choice of technologies available.
- candiodari 10y agoYou're being asked to be a consultant, you know. They want to pretend that if you rewrite Prolog in C#, it'll be simpler, and that the average C# programmer (the cheapest one they can hire) will simply understand (badly written) logic programming solvers and be able to modify them. Eventually you'll figure out to simply double your hourly rate and ask "do you want a bad Haskell implementation to go with that as well ? How about SQL ? Lisp ?" Don't forget to terminate with "by the way here's my card" (asking them to mention their personal referral code "ID10T") when the inevitable happens, nobody understands that code at all when they have to modify it. And every time they ask you to update it you increase your hourly rate 20%. You know, management realism. You can be victimized by it, or you can make a living out of it.
- andai 10y agoI don't know, sounds like it would be pretty confusing giving so many people the same referral code.
- ruleabidinguser 10y agoWhy couldn't you just tell them you were going to have to rewrite it if you couldnt get it embedded?
- Jtsummers 10y agoIt wasn't already written in prolog. It just would've been much easier and more straightforward for that particular application to write the business logic side in prolog. From a UI standpoint, I've never used prolog for a GUI so it would've needed to be embedded in something else (likely C# given the office preference) anyways, so the decision was to put everything in C# and skip my prolog idea. If I still had those notes, I basically translated handwritten prolog-esque code into C# anyways. EDIT: In very corporate offices like that one, you don't get to use <language of choice> unless it's staying strictly internal (this one had the potential to be released to customers), you have low oversight and can get away with it (not my case), you have a history of choosing wisely (I had little history with them at that point). They prefer to minimize the risk on the maintenance end (NB: doesn't mean they do what's needed to make maintainable code, they do what's needed to make it easy to hire maintainers by sticking to popular languages and frameworks instead).
- cat199 10y ago> they do what's needed to make it easy to hire maintainers by sticking to popular languages and frameworks instead) And completely miss the moment where the new maintainer comes in and says: "!@#$ why didn't they just write this in prolog? freaking PHB's"