Not particularly cursed, but my single-file Ruby-script APNS-notification-pusher with Redis ran for a couple years on the first try, and handled around ten million chat-app users on a single core with no trouble. I profiled to make sure it wasn't leaking when I wrote it and... yep, that's all it really takes. Bare-bones code is pretty effective at reminding me that computers are actually pretty fast nowadays.
I once worked on a project for one of the largest vendors of chemical lab equipment. The application was in... frickin' Microsoft Access, not my choice. This would've been the 90s. The idea is that the sales person would enter in what the lab needed to do and the database would show them the equipment they needed.
Anyway, we eventually developed a feature that allowed the application to copy out the lab process and equipment list to a separate database, zip it up, and FTP it to a server. It would also export a CSV file with the name of the lab, salesperson, date of sale, and other searchable information and FTP that up too. I wrote a "web service" (this was late 90s, before that term was cool) that would collect up these CSV files, aggregate them in one big CSV file, and then from within that application that CSV file could be searched and the appropriate ZIP file downloaded and merged with the local database. It was written in Perl and ran as a CGI script on some internal Windows NT machine's IIS instance. It was janky as all get-out, but it worked and we did it a couple of years before the big web services mania hit.
In the text file you have something you want to template (or "parametrize") from an outside variable, so you name that something like @@VAR@@ and then you can sed that @@VAR@@ :-)
That's how we do it. Not with sed exactly, but string replacement. One is a bull email sender that only supports VBScript, the other is C#, but the users aren't supposed (or need) to have full templating powers, so this way it's easier.
I think the m4 macro processor might be the more canonical way to do it. Unless you’re writing a shell script, in which case a “here-document” with embedded $VARIABLES is more straightforward.
I was working on a trading system at a bank that didn't have automated deployments so we relied on the Ops team to manually release code to production on our behalf. Release plans had to be documented in MS Word with step-by-step instructions that the Ops team would literally copy and paste into a terminal. It was the worst kind of Sarbanes-Oxley separation of duties theatre.
This system was built in Java and was launched using a simple shell script that used a `for` loop to build the classpath by looping over all the JARs in the lib folder and appending them to a shell variable. With the release "process" in mind, hotfixes and patches had to be kept as simple as possible. To release a hotfix we would JAR up the one or two classes that needed to be patched and into a single JAR file, then modify the startup script to pre-pend that JAR file to the classpath so that the patched classes were found first, taking advantage of Java's classpath loading algorithm.
Comments (499) 174 threads
Earlier commentsAnyway, we eventually developed a feature that allowed the application to copy out the lab process and equipment list to a separate database, zip it up, and FTP it to a server. It would also export a CSV file with the name of the lab, salesperson, date of sale, and other searchable information and FTP that up too. I wrote a "web service" (this was late 90s, before that term was cool) that would collect up these CSV files, aggregate them in one big CSV file, and then from within that application that CSV file could be searched and the appropriate ZIP file downloaded and merged with the local database. It was written in Perl and ran as a CGI script on some internal Windows NT machine's IIS instance.
It was janky as all get-out, but it worked and we did it a couple of years before the big web services mania hit.
In the text file you have something you want to template (or "parametrize") from an outside variable, so you name that something like @@VAR@@ and then you can sed that @@VAR@@ :-)
This system was built in Java and was launched using a simple shell script that used a `for` loop to build the classpath by looping over all the JARs in the lib folder and appending them to a shell variable.
With the release "process" in mind, hotfixes and patches had to be kept as simple as possible. To release a hotfix we would JAR up the one or two classes that needed to be patched and into a single JAR file, then modify the startup script to pre-pend that JAR file to the classpath so that the patched classes were found first, taking advantage of Java's classpath loading algorithm.
All comments shown.
Couldn't load more comments. Check your connection and try again.