|
i'm always amazed at how bad most people are at programming and software design. then i remember that it's a horrible thankless job that no one should ever do and they're probably bored, it gets in the way of their internet posting job, and they want to kill themselves but it pays the bills.
|
# ¿ May 9, 2013 06:44 |
|
|
# ¿ May 2, 2024 18:37 |
|
this guy with comp sci degree once spent a year writing a relatively simple time and billing system for the company i worked for. he was supposed to be being supervised by his former employer a very expensive consultant, who had all kinds of high end clients. dude quit a few days before his project was due to be completed, so my boss asked me to tidy it up so we could have it ready to run the next day. i sat down and within an hour of reading his code i figured it was unsalvageable for a whole bunch of reasons. after playing it all night i was sure it was useless. i told my boss and he talked to the consultant. the consultant said we could fix it, and him being far more experienced i figured i would just take direction from him. i wrote all the classes and functions to do the poo poo, he wanted to do from scratch, he umm tried to do something till 6 weeks later he told my boss we had to start again. fortunately the poo poo i'd written was generic enough as to fit in anywhere. The consultant billed us an obscene amount for a pretty lovely system and rehired the idiot to work for his firm, albeit doing something where he could do less damage. I don't even want to start on the project I'm on now.
|
# ¿ May 9, 2013 07:02 |
|
don't get me wrong i kind of like my life most of the time, and having done some really hard and horrible manual labour jobs i'd take my job any day, but if i could go back in time i would have studied harder and become a cult leader or something.
|
# ¿ May 9, 2013 07:04 |
|
like you know how they talk about people graduating from highschool and not being able to read. that programmer was the programming equivalent. i'm a pretty poo poo programmer but give me access to google and i'll figure out how to make something work, and spend a bit of time figuring out which is not the most horrible way to do what i want to do.
|
# ¿ May 9, 2013 07:07 |
|
Martytoof posted:Be an adult baby
|
# ¿ May 9, 2013 19:32 |
|
gucci void main posted:nothing you learn in college involving c++ is actually of use hth sulk you didn't go to college and by your own admission you are doing terrible a you first real programming job, so from what i can tell nothing you have to say is actually of use. hth. you also apparently think australia is part of europe.
|
# ¿ May 9, 2013 20:02 |
|
i think i want to start a project to access data in this horrible industry specific XML format from a horrible Web Service and dump it into a sql db. I'm back and forth between java and c# but i'm think c# because who am i kidding everyone uses windows, i'd like to make it not terrible what's a good starting point for learning c#. (i've done development before but it was a long time ago.)
|
# ¿ May 31, 2013 20:43 |
|
Nomnom Cookie posted:idk does your company do c# normally? bc otherwise java is better. users shouldn't be allowed to run code anyway it comes down to needing to get a good handle on .net stuff, knowing MSSQL pretty well already and already having a full msdn sub. i'll be writing it to fulfill a pretty specific internal role, but want to do it generic enough i can open source it if it doesn't suck.
|
# ¿ May 31, 2013 21:40 |
|
Bloody posted:read a thing about linq and become a happy linq seems cool, but still gotta connect to the horrible servers and get the ugly xml then i can use linq to make it play nice in the internal db.
|
# ¿ May 31, 2013 22:38 |
|
no i'm pretty sure i'm a terrible programmer now. i'm an excellent debugger though.
|
# ¿ May 31, 2013 23:55 |
|
~Coxy posted:google earth enterprise support is loving atrocious All of the major map players are loving horrible to deal with on the enterprise scale, like getting a license to transfer x,y coords geocoded with bing maps, to another provider which also uses bing maps on an enterprise scale should be relatively simple when both parties pay 100K to 1M a year in license fees to the same company right? no it's a 6 month process. I had an issue open with Bing/Navteq where an entire inhabited island (pop 350) which was several miles long wasn't appearing on their map (you could clearly see it with sat view) it took them just shy of two years to resolve.
|
# ¿ Jun 2, 2013 22:07 |
|
more dope growing hippies, but at the same time it's 28 square mile inhabited island in a first world country.
|
# ¿ Jun 2, 2013 22:22 |
|
I woke with a start, bathed in cold perspiration. I was in my cubicle, at work. The last thing I remembered, I'd been going through the morning emails. Last night had been busy: patching the servers, plugging the latest security holes with bits of chewed bubble-gum, the usual routine. OK, I shouldn't have dozed off, but I suppose that the effect of last night's cheap bourbon had begun to kick in. I'm only an occasional drinker, the kind of guy who goes out for a beer, and occasionally wakes a few days later in Saigon with a full beard. As I pulled myself back to full wakefulness, my nerves tingled, sensing some evil presence, perhaps in the cubicle, veiled by the shadows. I glanced at my screen and then I noticed it. "What's this? A new database? Where did that come from?" I recoiled instinctively, as if a great cobra sat coiled on the keyboard. Dark forces seemed to be stirring. I shook my head. "My nerves must be out of order!" I told myself. After all, what's the harm in a new database. I'll just keep a weather eye on the server and it'll be fine. The phone rang. It was the SAN Admin, Mildred. She cut short the usual pleasantries, never a good sign. "How's the boy? What 'cha doin to my disks?" she hissed, as if I was personally doing her wrong. Hell, it must be that new database. I played dumb. "I don't know what you're talking about Mildred. Which server is having trouble?" I tried to sound nonchalant, but my voice came out as a nervous squeak; the disks were her girls and they weren't happy. "There are massive reads and writes going on. My girls are rattling like mice." "I don't know, Mildred. There was a new app released last night, maybe that's it." "Well, ya better find out, and fast. Don't you guys have any monitoring?" Mildred knows how to make a guy feel small. "We're working on it," I lied, smooth as a grifter running twenties on a barman. I put my feet on the floor, swabbed the back of my neck, and pulled the keyboard towards me. That poison snake of a database was bugging me. I did what I always do, go and shake down the historic records in the cache to see what falls out: code:
Used with skill, Object Relational Mapping software is a great way to build the data access layer of an application. In careless hands, though, it's deadly. If these queries had Thompsons, there would have been blood all over the server room floor. I wondered if they'd walked into the N+1 trap? I looked at another couple of queries...and there it was, like a great fat spider in the center of its malignant web: code:
I had better check the tables too. Just as I feared. Clustered indexes and logical constraints were conspicuous only by their absence. If you're using a relational storage engine, you have to work within its rules, and this object-oriented approach to tables was breaking as many rules as it could find. I was clearly on a path to the Developers' Den, but I wasn't going alone this time. I called Mildred back. "We're going to talk to the Dev Lead?" she asked in a voice quieter than I knew her capable of. A strange rattling noise echoed down the line, eerily reminiscent of her beaten-down disk drives. Her teeth were chattering with a nameless dread. The Developers' Den I met Mildred in the corridor, which had a smell of old carpet and furniture oil and the drab anonymity of a thousand shabby lives. Her smile was as faint as a fat lady's at a fireman's ball. The only way in to the Developers' Den was through a little sliding door that let those inside see who was trying to enter their space. It slid open a fraction, revealing a pair of eyes regarding us suspiciously. "We need to talk about the data access layer for your new application." "Who are you, the DBA? I thought you quit. Or maybe that was the guy before. It's a pity what happened to him…after he complained about our last application." How could I forget? "Look, we just need to talk to the Dev Lead for a few minutes. I'm sure we can sort this out." "He's busy. Just do what you usually do. Put a few indexes in the database." I sighed. Why do devs think an index is the answer to all their problems? "An index ain't going to cut it this time..." He was already sliding the door closed. "I hear you guys also have a few Access apps that need a lot of healing. Good luck with that!" It was desperate but it got him where he lived. The door slid back open to reveal a face with as much expression as a cut of round steak and a similar complexion. The smell of old pizza and Nerf washed over us. Keyboards clattered away on a hundred laptops and desktops. There was a lot of forking, pulling, and merging going on in here, interrupted by an occasional piercing scream, as someone attempted a rebase. He led us to one of the Dev Lead's assistants. "The DBA? I thought you quit," he sneered. "Rumors of my demise seem to be exaggerated. Listen, your new app is beating on our database like a heavyweight contender smacking a palooka around the ring in a fixed fight." "That's a real pity. Sounds like you need a few sticking plasters, or indexes as you like to call them." This guy had all the charisma of a plastic cup. I counted ceiling tiles for a minute then leaned over his desk, knocking a Lego Millennium Falcon off its stand. "No. An index won't help this time. This is a real code problem. And unless you want to spend the rest of your very short career putting in daily security requests for access to your dev database, get me to the Dev Lead! Now!" Keyboards quieted all around the room. I heard mumbling and pointing and the phrase "...thought he quit...". The developer fumbled with the Millennium Falcon, accidentally breaking off a missile launcher, before giving up and looking at me again. I hadn't known him long but I could tell that thinking was always going to be a bother to him. "OK. Your funeral." He grabbed his phone. The response was quick. "He's down in Conference Room C. It's just...". We didn't wait to find out more. Conference Room C Anger and frustration can carry a man far, but on nearing the Dev Lead's inner sanctum I took stock. Maybe the devs were right; an index or three might prop things up well enough. Forced parameterization might just help too. I glanced at Mildred. The look in her eyes told me I couldn't let her girls down. It was time to stop compromising. I shouldered on into Conference Room C. Around the room, little notes colored green and blue and pink fluttered faintly in the gentle breeze of the air conditioner. Don't let the pretty colors fool you; each of those pretty notes will become real code that can crush a database with one gentle waft of its bat-like wings. We walked in, as inconspicuous as a tarantula on a slice of angel food. And there sat the Dev Lead, fingers flying across the keyboard while one of his flunkies watched. "...and that will fix the object inheritance problem you were hitting. Now get out before I put you in charge of maintaining the source control and bug-tracking systems for the next project." The flunky stumbled into us as he tried to leave. The Dev Lead glanced up. He smiled, as stiff as a frozen fish, and glanced to either side of the door. That's when I noticed the code-droppers standing there, hulking, menacing developers, wearing Star Wars t-shirts and each with a paw full of pizza. I tried to ignore them as the Dev Lead started to speak. "Ah, Joe Deebeeay. I heard you quit. Who is that with you? Mildred from the SAN team. Darling, come in and sit here next to me." Mildred edged nervously around the conference table and perched herself right next to the Dev Lead. Suddenly my side of the table felt like the loneliest place in the world. "What can I do for the database team?" He beamed magnanimously at Mildred, but his eyes were like steel when they turned on me, and his voice as cool as a cafeteria dinner. Gulp. "The application that was installed last night, it's causing major problems with the database and the disks. I did a little investigation and it looks like you guys introduced an ORM for the data access layer." At the mention of the ORM, his brow furrowed. Suddenly, I was a particularly large rattlesnake and he had his gun ready. "Look, you know, I'm not going to have this 'ORMs are awful' conversation again." I took a chance and interrupted, "Of course not. ORMs are extremely useful tools that..." I choked on my own words for a second "...facilitate the speed of software delivery. No question. Keep using the ORM." The Dev Lead's jaw was hanging open and one of his code-droppers dropped his pizza on the floor. It bought me the time I needed. "The problem is not the ORM; just a few small mistakes in the way it was implemented. The database that it created is a direct copy of the objects in the code. Your guys turned ORM into OOM and that's the issue." He breathed softly, twisted one large hand around his knee and looked down at it. I took it as an excuse to go on. "There are some places where this direct object storage works well and others where we need to adjust the storage to be a little more...relational. After that, we drop a few clustered indexes in the appropriate places and we're almost home and dry." At the mention of indexes, there was an audible sigh of relief and the tension in the room lifted. Finally, I was acting like a proper DBA again. It seemed like as good a time as any to drop the bombshell. "Of course, to make this work, we'll have to adjust some of the code to use stored procedures." The final two words came out in a strangled whisper, about as welcome as a dead rat in the punch bowl at a classy dinner party. The two code-droppers closed in menacingly, "Thanks for the advice. Now, here's some for you and your stored procedures..." My time was almost up. "We'd only need to do this in one or two places. We could use your generated code for most of the CREATE, UPDATE, and DELETE queries, and those READ queries where it made sense. That's what the ORM does best. In other places, we'd just substitute straight T-SQL for the batch-mode processing that T-SQL is good at." The Dev Lead lurched to his feet, practically knocking Mildred off her perch. My next words, possibly my last, came out in a frantic rush. "Look, it's not as if this is premature optimization. Mildred and her girls, uh, I mean disks, are dying out there! This would eliminate the N+1 problem and many of the other issues with passing in hundreds of parameters." By this time, the Dev Lead was round my side of the table. Suddenly, I missed feeling lonely. His outstretched arm appeared to be heading for my throat but at the last second diverted and went around my shoulder. "You crazy kid!" I was older than he was, but decided not to argue the point. He turned to a code-dropper, "Can you believe the brass on this kid? He walks in here and tells us how to run our show?" He paused, and then laughed. "I love it!" That was all that the muscle needed to hear and they joined in the laughter. "OK, let's see what we can do, together, to save Mildred's girls." Mildred managed a weak smile. We made plans for further meetings to establish mechanisms of communication between the teams and start the process of identifying the worst performing code. We turned to leave, but the Dev Lead had a parting shot. "Oh, and Joe, I'll book a time for us to have a quiet word about those Access apps that are giving us trouble. It looks like the Access team might need a new member for a week or two." I managed a weak smile too. The Fix? Mildred and I finally made it out of the Developers' Den. I had a full schedule of appointments and a lot to explain to the Fat Man. Mildred was grinning from ear to ear but then noticed the look on my face, "What's the matter, Joe? Apart from your impending stint in the Access asylum, we got everything we wanted." "I dunno, Mildred. Time eats away at all good things, and some time real soon the devs are going to update that app, and their ORM will start messing again with the database. Your girls ain't safe yet." The smile vanished from her face. "Plus, once there's data in place, we can't just let the ORM create, drop, and alter tables, right in production. The Fat Man won't like it. He's funny that way."
|
# ¿ Jun 3, 2013 17:38 |
|
gucci void main posted:its gonna be in the context of android programming because gently caress web apps, but theres a lotta oop concepts you dont/shouldnt really use in plangs even if you can technically write w/them in "oop" style and i wanna get better at it i like oo very much because it made sense immediately.
|
# ¿ Jun 3, 2013 17:56 |
|
metric time for sure bring in the 10 unit day
|
# ¿ Jun 4, 2013 23:09 |
|
humans aren't computers?
|
# ¿ Jun 4, 2013 23:25 |
|
how would we know what time the bars closed?
|
# ¿ Jun 4, 2013 23:27 |
|
prefect posted:i'm thinking people would get mad if noon came around and the sun wasn't somewhere in the general overhead area we could rotate one zone to the west every year so that once every 24 years your noon would be correct.
|
# ¿ Jun 4, 2013 23:30 |
|
PleasingFungus posted:
gunit
|
# ¿ Jun 17, 2013 19:24 |
|
Brain Candy posted:most programmers are assholes. all programmers are terrible. i'm a terrible programmer, thankfully it's not really a big part of my job, what sometimes astounds me is how terrible most people who get paid to be programmers are at programming.
|
# ¿ Jun 19, 2013 00:27 |
|
I'm trying to normalize a table where each row contains 3 delimited strings with hundreds on entries in each. I've got a split string function which works well and the following function works but feels like idiot SQL to me because I'm making 3 temp tables with an identity and joining them all for the return table. Is there a simple solution?code:
|
# ¿ Jul 31, 2014 00:44 |
|
it's more of I want to know the right way. it's for data conversion so it only needs a couple of runs anyway, so in this case efficiency doesn't matter. it just feels like I'm doing something ugly where there should be a tidier approach.
|
# ¿ Jul 31, 2014 01:46 |
|
Luigi Thirty posted:ah databases something i do know abo-- what the hell is that schema for some reason the author of this abomination decided just put GL accounts with one row each and concatenate the credits / debits in caret delimited strings.
|
# ¿ Jul 31, 2014 02:49 |
|
Luigi Thirty posted:do... do they still work there "they" is the author of a member database system for organizations which at one time had thousands of customers including some you've heard of. the poo poo is a result of an sql conversion upgrade from some dumbass flat file mainframe thing. dude sold his company to a huge company for a shitload of money, who then several years later gave it back to him. I don't have access to the application code and the only person who does that i know personally is a mediocre programmer at best (not to mention the code is c++ so if the SQL is that much of an abomination i don't actually want to see it)
|
# ¿ Jul 31, 2014 04:06 |
|
Shaggar posted:I don't think you really need the temp tables but maybe im not totally getting the entire problem. thanks i'll try that tomorrow.
|
# ¿ Jul 31, 2014 04:06 |
|
Shaggar posted:or maybe a cross apply? like i use cross apply on the return value from the function above in order to create a final table with |ACCTNO|FISCAL_PER|DR|CR| so that the table can be keyed on ACCTNO and FISCAL_PER for sensible queries. Then I normalized out all of the other account details. (if account type, header account etc) the results are financially sound it's just my function above feels like it could be done much better which I think you did in your previous post.
|
# ¿ Jul 31, 2014 05:05 |
|
i just hate it when I know there's a better way to write a query, but the fact i don't do this poo poo every day makes it hard for me to figure out.
|
# ¿ Jul 31, 2014 05:22 |
|
I'm trying to figure out the best way construct a search based on a web search form that searches a number of descriptive fields in a relatively well normalized sql server product database (Each non numerical form field is tied to its own lookup) How do I construct the search queries to return relevance ranked results. Preferably with weights assignable to each field (by me not the person doing the searching) The search form would have options for things like price range, colour, style, features. As well as a keyword search which would search both simple fields and a plain text field.
|
# ¿ Oct 16, 2014 21:17 |
|
It's seems that maybe the best solution would be to concatenate all non numerical data to a hidden text field then full text earch that then search the numerical data and then count the number of matches for the numerical information and order the results based on that. I don't know how that would perform on a national site that gets millions of visitors a day though.
|
# ¿ Oct 16, 2014 21:26 |
|
|
# ¿ May 2, 2024 18:37 |
|
Shaggar posted:write a proc w/ all the possible search parameters. make them optional parameters This is basically what I want, but how terribly will that perform? Will magical background optimization mean it actually works relatively well? Performance wise would I be better off just converting any that is textable to text and having a big search text field (It would be 2K chars max) then searching that using full text search with relevancy? Shaggar posted:altho that search will return only things that match. if you want to weight on match count then its probably gonna be gross fortunately match count won't be an issue, in fact we specifically wouldn't want that.
|
# ¿ Oct 16, 2014 22:26 |