|
Jabor posted:
Sadly, goto is predictably banned. There's more though! I have to limit lines to 80 char width. And despite the single point of return thing, I CAN USE EXCEPTIONS. I can only type "return" once, but "throw" many times! Also this thing about function calls in conditionals really fucks while loops: code:
code:
|
# ? Jun 19, 2012 19:04 |
|
|
# ? May 14, 2024 04:02 |
|
Zhentar posted:Millions upon millions of lines of code, decades of data accumulated. Migrating would cost us man-millennia, on top of enormous expense & effort on the part of our customers, and would probably take at least 5-10 years before nearing the stability of our current codebase. Yeah, exactly. What does tend to happen is they slap on new layers of user interface with a more modern look and feel, and/or move towards using the old database more as a source for exporting data into other things. But the legacy ware is still lurking somewhere at the bottom and some guy has to be paid to maintain it. Unbeatable job security if you're willing to be the guy who has to dig into uncommented code which is all about variables called VW, VWW, VWWW and so forth. Groke fucked around with this message at 19:20 on Jun 19, 2012 |
# ? Jun 19, 2012 19:17 |
|
Well, the boss just explained the method to his madness. Because the joins throughout the code are designed like poo poo (apparently the requirements to work on our code do not include "knowing how to alias a MySQL table/column" or "what mysql_select_db does") he tries to pick hosed up names that are 99.9% guaranteed to not be used anywhere else so that queries don't break with Ambiguous column "butts". (Have I mentioned that our solution to errors is display_errors 0 without actually logging anything yet? And that there's no single include I could hijack to inject a sane error handler? That's probably important.) Oh well. Having to remember if it's id or id_devices or device_id or deviceid or deviceID is keeps me on my toes.
|
# ? Jun 19, 2012 19:17 |
|
Zamujasa posted:Well, the boss just explained the method to his madness. Because the joins throughout the code are designed like poo poo (apparently the requirements to work on our code do not include "knowing how to alias a MySQL table/column" or "what mysql_select_db does") he tries to pick hosed up names that are 99.9% guaranteed to not be used anywhere else so that queries don't break with Ambiguous column "butts". Is your boss's name Dave? I had a boss named Dave who did exactly this, including modifying production on the fly.
|
# ? Jun 19, 2012 19:18 |
|
trex eaterofcadrs posted:Is your boss's name Dave? I had a boss named Dave who did exactly this, including modifying production on the fly. Thankfully, no. But based on anecdotal evidence, it seems like there are just 50 clones of the same person with different names, who all managed to get programming positions doing their best to throw wrenches into everything.
|
# ? Jun 19, 2012 19:20 |
|
Kim Jong III posted:I've always wondered about jobs with stuff like MUMPS or NATURAL or these languages that are responsible for huge amounts of data but for only like four or five companies in the world. My friend works at a big defense company (Either Boeing or Raytheon). They have a lot of legacy code that really can't be ported (I'm guessing because of problems Groke mentions, like no testing, no commenting) and the machines that they use to run on no longer exist so he develops emulators for the old systems so it can run the legacy code.
|
# ? Jun 19, 2012 19:23 |
|
Strong Sauce posted:My friend works at a big defense company (Either Boeing or Raytheon). They have a lot of legacy code that really can't be ported (I'm guessing because of problems Groke mentions, like no testing, no commenting) and the machines that they use to run on no longer exist so he develops emulators for the old systems so it can run the legacy code. Haha, Jesus. At least my language is still officially supported and sees new versions and such.
|
# ? Jun 19, 2012 19:31 |
|
Groke posted:Haha, Jesus. At least my language is still officially supported and sees new versions and such. Officially supported: that's the key. I do when official support for large software stacks goes away and the business says no to upgrading for reason R despite security issue S and "it's fixed in the next version".
|
# ? Jun 19, 2012 20:17 |
|
Groke posted:Yeah, exactly. But oh dear god does it come with a whole bouquet of hidden costs. For starters the cost of replacing it tends to increase over time as you put more and more work into it, and the cost of maintaining it goes up disproportionately compared to a similar system implemented in a more modern/sane environment (mitigated somewhat by a fully competent team running the show). You are also in a much tougher hiring market because job seekers with experience in X are a dying breed, so their price tends to go up not to mention the difficulty in finding them period. You can supplement that with solid new hires ready to learn but now you have the cost of a long, steep ramp up process. Oh, don't forget it's a fleeting knowledge base; your team can't exactly use google / stack exchange as a backdrop for those "I'm not sure offhand but I'm certain someone else has come across this" problems that inevitably crop up. And last but not least, your workers are going to start realizing that pouring years into X is something of a resume dead end. I mean it's still work and shows a lot of good qualities for sticking with something unpleasant for the sake of business and so on. But in the long run they're limiting their employment options in the same way you're limiting your hiring options. If you find one of those hard to find people with previous experience in X, or you spend the 4-6 month ramp up on some new hire to get them productive, you're still looking a substantial risk of losing them within 4-5 years just by the nature of the work they're doing. Bhaal fucked around with this message at 20:36 on Jun 19, 2012 |
# ? Jun 19, 2012 20:25 |
|
Bhaal posted:And last but not least, your workers are going to start realizing that pouring years into X is something of a resume dead end. Yup. My career started writing code in a proprietary language called GEMBASE that was only used by an ERP system. Try to find anything in-depth about it on Google; there isn't much. You pretty much have to hire fresh-out-of-college to get someone to work with a language like that unless they've already been doing it for a while. I wouldn't program in GEMBASE again for any amount of money. Luckily, toward the end of my tenure at the company we started writing supplemental applications in VB .NET, which led me to my current career as a C# developer.
|
# ? Jun 19, 2012 21:10 |
|
Strong Sauce posted:My friend works at a big defense company (Either Boeing or Raytheon). They have a lot of legacy code that really can't be ported (I'm guessing because of problems Groke mentions, like no testing, no commenting) and the machines that they use to run on no longer exist so he develops emulators for the old systems so it can run the legacy code. When I'm a particularly low ebb I think about all the office productivity software that is effectively written as an emulation layer for the business practices of the 1950s and just how much this is holding us back as a civilisation.
|
# ? Jun 19, 2012 23:37 |
|
Zombywuf posted:When I'm a particularly low ebb I think about all the office productivity software that is effectively written as an emulation layer for the business practices of the 1950s and just how much this is holding us back as a civilisation. +1 Not that I know there's better ways of handling business or whatever, but it always saddens me that so much software is like...well...here's a typewriter on your screen, here's a ledger on your screen, here's a Rolodex on your screen, etc.
|
# ? Jun 19, 2012 23:40 |
|
Thermopyle posted:+1 Even worse are the ways of simulating the processes of passing documents from person to person with a growing pile of notes stuck to the front. Excel is often used for this. Where MY GF works there is a person who's job is to take forms and turn a list of checkboxes into a binary representation and write it on the form so someone else can type it into a spreadsheet. You see, there's only one copy of the spreadsheet on a shared drive so only one person can edit it at a time. Periodically the spreadsheet is recreated and the previous one sent on to the next stage of the process. While it is an excellent example of how to deal with contention using the single writer paradigm, it hurts to think of people doing it by hand.
|
# ? Jun 19, 2012 23:49 |
|
Zombywuf posted:Even worse are the ways of simulating the processes of passing documents from person to person with a growing pile of notes stuck to the front. Excel is often used for this. Where MY GF works there is a person who's job is to take forms and turn a list of checkboxes into a binary representation and write it on the form so someone else can type it into a spreadsheet. You see, there's only one copy of the spreadsheet on a shared drive so only one person can edit it at a time. Periodically the spreadsheet is recreated and the previous one sent on to the next stage of the process. I bet if you talk to the people at your GF's company, they'd look at you like you had two heads if you started talking about Google docs. We moved over from Lotus Notes 6.5.1 to gmail... earlier this year. Lotus Notes was configured so that it was impossible to index your in-box (seriously) and that functionality was locked down by an administrator, so it took like 15 minutes to do a full text search of an inbox. Seriously. Yet when we moved over, everyone started complaining about GMail sucked - for the first 3 weeks after we moved over to gmail, the IT director would shout "gently caress GMAIL" across the entire office at 4 PM in the afternoon like clockwork every single day...
|
# ? Jun 20, 2012 00:38 |
|
hieronymus posted:I bet if you talk to the people at your GF's company, they'd look at you like you had two heads if you started talking about Google docs. HIPAA could be a major concern for migration to Google Docs (apart from pre-existing data, etc), no?
|
# ? Jun 20, 2012 01:19 |
|
Zombywuf posted:Even worse are the ways of simulating the processes of passing documents from person to person with a growing pile of notes stuck to the front. Excel is often used for this. Where MY GF works there is a person who's job is to take forms and turn a list of checkboxes into a binary representation and write it on the form so someone else can type it into a spreadsheet. You see, there's only one copy of the spreadsheet on a shared drive so only one person can edit it at a time. Periodically the spreadsheet is recreated and the previous one sent on to the next stage of the process. This is where some jerk who knows just enough to be destructive comes in and suggests SharePoint because versioning.
|
# ? Jun 20, 2012 01:54 |
|
hieronymus posted:I bet if you talk to the people at your GF's company, they'd look at you like you had two heads if you started talking about Google docs. It's the civil service, their major complaint about Google Docs is that it doesn't work in IE6. Their internal web apps (where data is copied by hand from and to spreadsheets) only work in IE6 so it's mandatory.
|
# ? Jun 20, 2012 02:29 |
|
So install Google Chrome Frame: that is why it exists?
|
# ? Jun 20, 2012 02:41 |
|
I love how the internal error page of one of our systems says we've been notified about this issue and will look at it shortly even though even the developers can't access those errors.
|
# ? Jun 20, 2012 08:16 |
|
Zombywuf posted:Even worse are the ways of simulating the processes of passing documents from person to person with a growing pile of notes stuck to the front. Excel is often used for this. I work with an application that was created from the ground up to support workflows involving typists creating electronic documents based on handwritten notes. It goes something like this: 1. A handwritten document is created and scanned into the system using a mostly automated process. 2. The document arrives in a work queue where it is eventually picked up by a typist. 3. The typist types up the document based on the scanned document (for extra hilarity this step does not support multiple monitors) using some kind of crazy Word hook-in. 4. The typed document is then sent for approval, if approved it is converted to PDF and stored. If declined it is sent back to step 3 with notes on fixes. And yes, there are still typists employed by the company. Not enough and so some people are both users and typists and perform all the steps themselves to keep the "processes aligned", this includes logging out and in to switch users halfway through.
|
# ? Jun 20, 2012 08:47 |
|
Zamujasa posted:I'd consider another job but right now I've worked hard for my lowly $15/hour wage. At least I have benefits, even if they do come out of my paycheck at the end of the week. Hey, stop selling yourself short. If your competent enough to point out those flaws, you're probably worth more than $15/hr. Seriously, IT helpdesk people make more than that. Even if you are dangerously incompetent you could still make $25/hr like any bog-standard PHP developer.
|
# ? Jun 20, 2012 10:10 |
|
Geekner posted:Hey, stop selling yourself short. If your competent enough to point out those flaws, you're probably worth more than $15/hr. Seriously, IT helpdesk people make more than that. I've been tempted to ask for a raise recently (I know other people they have considered hiring on at $60K/year) but things have been incredibly hectic for the last several weeks and I haven't managed to get above water in terms of project due dates. "Surprise, now we're doing __________ instead of __________" and we have about 50 things that are on the to-do list but never actually get done because they change directions almost every other day. Things should cool down a bit in the next week or two. If they don't, then...
|
# ? Jun 20, 2012 10:37 |
|
MrMoo posted:So install Google Chrome Frame: that is why it exists? Users? Install software on their own machines?
|
# ? Jun 20, 2012 12:34 |
|
SavageMessiah posted:There's more though! I have to limit lines to 80 char width. And despite the single point of return thing, I CAN USE EXCEPTIONS. I can only type "return" once, but "throw" many times! Whenever you'd want to do a return just stick your return value in an exception and throw it. Then wrap the entire method in a try/catch block, extract the return value and return it. Single point of exit.
|
# ? Jun 20, 2012 13:48 |
|
God drat do I hate "single point of exit" as a design philosophy. It's the cause of conditional blocks the size of skyscrapers that are impossible to parse when all you need is if (gently caress == null) return false; Granted, this only happens if the code is also full of massive functions. It's probably okay to use single point of exit if you manage to keep functions small, and it's probably (somewhat) okay to make a lot of long functions if you can make them readable, but combine single point of exit with behemoth functions and you have planted the seeds of despair.
|
# ? Jun 20, 2012 14:04 |
|
dwazegek posted:Whenever you'd want to do a return just stick your return value in an exception and throw it. Then wrap the entire method in a try/catch block, extract the return value and return it. Single point of exit. Make sure to use the smuggest face possible when explaining what you've done.
|
# ? Jun 20, 2012 14:24 |
|
LOOK I AM A TURTLE posted:God drat do I hate "single point of exit" as a design philosophy. It's the cause of conditional blocks the size of skyscrapers that are impossible to parse when all you need is if (gently caress == null) return false; As I understand it, "single point of exit" was once - back in the unstructured programming days when things like "subroutines" were more a matter of programmer convention than a language feature - "single point of entry, single point of exit". It was a mantra encouraging programmers not only to arrange their code into subroutines, but also to avoid jumping into or out of the middle of them, making control flow (and stack management) impossible to follow. Of course, structured programming won and these days "single point of entry" has withered away like the useless appendage it is. "Single point of exit", however, is still with us, making GBS threads up coding styles far and wide.
|
# ? Jun 20, 2012 14:50 |
|
It could also conceivably make cleanup easier, if there's only one point where your code can exit a function, then there's also only one point where you need to de-allocate resources etc. Of course, now (almost) every language has far better methods for doing this. Not to mention that the very presence of exceptions means you might not be able to rely on your single point of exit (and thus your cleanup) ever executing.
|
# ? Jun 20, 2012 15:08 |
|
ToxicFrog posted:
Let me tell you about the goto statement and also what it is considered:
|
# ? Jun 20, 2012 15:51 |
|
So I had to poke around in a homegrown CMS system that a client's old web dev shop wrote ~6 years ago. It is full of horrors, but the README file takes the cake:code:
|
# ? Jun 20, 2012 16:32 |
|
door.jar posted:I work with an application that was created from the ground up to support workflows involving typists creating electronic documents based on handwritten notes.
|
# ? Jun 20, 2012 16:52 |
|
dwazegek posted:It could also conceivably make cleanup easier, if there's only one point where your code can exit a function, then there's also only one point where you need to de-allocate resources etc I'm curious how people feel about the goto statement as an approach to this. C++ code:
|
# ? Jun 20, 2012 17:38 |
|
I prefer multiple labels rather than the checks for each variable (and free(NULL) is required to be a no-op so the check there is pointless and dumb), but in general that's the only sane approach I've seen in C.
|
# ? Jun 20, 2012 17:45 |
|
Suspicious Dish posted:I'm curious how people feel about the goto statement as an approach to this. It's a shame that C++ doesn't have a finally construct.
|
# ? Jun 20, 2012 17:46 |
|
The usual way to do it is to have out_socket_close and out_free_url labels instead of having extra conditions in the exit path. edit: beaten.
|
# ? Jun 20, 2012 17:47 |
|
If you ever see 'php' and 'mysql' tags next to each other in Stack Overflow you can guarantee whatever is inside is a horror.
|
# ? Jun 20, 2012 17:48 |
|
Ithaqua posted:It's a shame that C++ doesn't have a finally construct.
|
# ? Jun 20, 2012 17:48 |
|
I wouldn't mind finally when using C APIs to a small enough extent that wrapping them in RAII would be a hassle, or even to reset some std::ostream formatting state.
|
# ? Jun 20, 2012 17:51 |
|
It's not very hard to write a generic RAII container for c api things:C++ code:
|
# ? Jun 20, 2012 18:00 |
|
|
# ? May 14, 2024 04:02 |
|
ijustam posted:If you ever see 'php' and 'mysql' tags next to each other in Stack Overflow you can guarantee whatever is inside is a horror. Yeah though I mean 99% of Stack Overflow is a horror anyway, those tags just ensure the deck is fully stacked.
|
# ? Jun 20, 2012 18:01 |