Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "thinking-in-sql"
-
If all you have is a hammer, everything looks like a nail!
This was something which my tech lead used to tell me when I was so obsessed with nosql databases a few years back. I would try to find problems to solve that has a use case for nosql databases or even try to convince me(I didn’t realise it back then) that I need to use nosql db for this new idea that I have, without really thinking deep enough whether the data in question is better represented using an sql schema or not.
Now, leading a team of young developers, I come across similar suggestions from few of my team members who just discovered this new and shiny tech and want to use it in production projects.
While I am not against new and shiny, it’s not a good practice to jump right in to it without exploring it deep enough or considering all the shortcomings. The most important question to ask is, whether some of the problems you are trying to solve can be solved with the current stack.
Modifying your stack requires more than just a week’s experience of playing around with the getting started guide and stack overflow replies. This is something which need to be carefully considered after taking inputs from the people who would be supporting it, that include operations, sysadmins and teams that are gonna interface with your stack indirectly.
I am not talking about delaying adoption by waiting for long list of approvals to get some thing that would bring immediate value, but a carefully orchestrated plan for why and how to migrate to a new stack.
Just because one of the tech giants made a move to a new stack and wrote about it in their engineering blog doesn’t mean that you need to make a switch in the same direction. Take a moment to analyse the possible reasons that motivated them to do it, ask yourself if your organisation is struggling with the exact same problems, observe how others facing the same issue are addressing it, and then make an informed decision.
Collect enough data to support your proposal.
Ask yourself again if you are the one holding the hammer.
If the answer is no, forge ahead!9 -
I'm drunk and I'll probably regret this, but here's a drunken rank of things I've learned as an engineer for the past 10 years.
The best way I've advanced my career is by changing companies.
Technology stacks don't really matter because there are like 15 basic patterns of software engineering in my field that apply. I work in data so it's not going to be the same as webdev or embedded. But all fields have about 10-20 core principles and the tech stack is just trying to make those things easier, so don't fret overit.
There's a reason why people recommend job hunting. If I'm unsatisfied at a job, it's probably time to move on.
I've made some good, lifelong friends at companies I've worked with. I don't need to make that a requirement of every place I work. I've been perfectly happy working at places where I didn't form friendships with my coworkers and I've been unhappy at places where I made some great friends.
I've learned to be honest with my manager. Not too honest, but honest enough where I can be authentic at work. What's the worse that can happen? He fire me? I'll just pick up a new job in 2 weeks.
If I'm awaken at 2am from being on-call for more than once per quarter, then something is seriously wrong and I will either fix it or quit.
pour another glass
Qualities of a good manager share a lot of qualities of a good engineer.
When I first started, I was enamored with technology and programming and computer science. I'm over it.
Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all.
The most underrated skill to learn as an engineer is how to document. Fuck, someone please teach me how to write good documentation. Seriously, if there's any recommendations, I'd seriously pay for a course (like probably a lot of money, maybe 1k for a course if it guaranteed that I could write good docs.)
Related to above, writing good proposals for changes is a great skill.
Almost every holy war out there (vim vs emacs, mac vs linux, whatever) doesn't matter... except one. See below.
The older I get, the more I appreciate dynamic languages. Fuck, I said it. Fight me.
If I ever find myself thinking I'm the smartest person in the room, it's time to leave.
I don't know why full stack webdevs are paid so poorly. No really, they should be paid like half a mil a year just base salary. Fuck they have to understand both front end AND back end AND how different browsers work AND networking AND databases AND caching AND differences between web and mobile AND omg what the fuck there's another framework out there that companies want to use? Seriously, why are webdevs paid so little.
We should hire more interns, they're awesome. Those energetic little fucks with their ideas. Even better when they can question or criticize something. I love interns.
sip
Don't meet your heroes. I paid 5k to take a course by one of my heroes. He's a brilliant man, but at the end of it I realized that he's making it up as he goes along like the rest of us.
Tech stack matters. OK I just said tech stack doesn't matter, but hear me out. If you hear Python dev vs C++ dev, you think very different things, right? That's because certain tools are really good at certain jobs. If you're not sure what you want to do, just do Java. It's a shitty programming language that's good at almost everything.
The greatest programming language ever is lisp. I should learn lisp.
For beginners, the most lucrative programming language to learn is SQL. Fuck all other languages. If you know SQL and nothing else, you can make bank. Payroll specialtist? Maybe 50k. Payroll specialist who knows SQL? 90k. Average joe with organizational skills at big corp? $40k. Average joe with organization skills AND sql? Call yourself a PM and earn $150k.
Tests are important but TDD is a damn cult.
Cushy government jobs are not what they are cracked up to be, at least for early to mid-career engineers. Sure, $120k + bennies + pension sound great, but you'll be selling your soul to work on esoteric proprietary technology. Much respect to government workers but seriously there's a reason why the median age for engineers at those places is 50+. Advice does not apply to government contractors.
Third party recruiters are leeches. However, if you find a good one, seriously develop a good relationship with them. They can help bootstrap your career. How do you know if you have a good one? If they've been a third party recruiter for more than 3 years, they're probably bad. The good ones typically become recruiters are large companies.
Options are worthless or can make you a millionaire. They're probably worthless unless the headcount of engineering is more than 100. Then maybe they are worth something within this decade.
Work from home is the tits. But lack of whiteboarding sucks.37 -
Most hated language features?
PL/SQL:
• it exists
XSLT:
• it also exists
PHP:
• it still exists.
VB:
• Significant parentheses: `subName` calls the subroutine, and `subName()` calls the subroutine and gets a return value. If you use the wrong invocation, it yells at you. Why!?
• For reasons unknown, you can only have `sleep` appear once per codebase. (So put it in a function!)
Ruby:
• It’s bloody easy to write code with absolute shit performance, and it kind of feels encouraged because of just how easy Ruby makes everything. Less critical thinking means worse performance, and Ruby’s blissful elegance encourages mental laziness.
• Minor: You cannot pass a hash as the first method parameter without enclosing it in parentheses, ex:`method({key: value})`. This is due to the ambiguous case between passing a hash argument and a (curly) block/proc (`method {|args| code}`). This could be remedied pretty easily with a little bit of look ahead.
• Minor: There is no `elsif` for `unless` (a negated if). Why? No reason given.
Python:
• no block endings, so nested code can be extremely difficult to follow.
Bash:
• The freaking syntax oh god why.
All languages:
• rand vs rand() vs Rand vs Rand() vs rnd vs RND vs random() vs random vs randInt() vs Math.random() vs Math.randInt() vs ...18 -
Guy I work with: Hey can I borrow you for a minute
Me: sure. What do you need?
Him: so this is a project me an the other dev worked on
Me thinking: Well I know he did it all and sent you the project so don't tell me you worked on it
Him: so we use it to do this and this and send an email to this new account I made because (2 minute explanation)
Me thinking: I don't care. Just tell me what your issue is! I already know what it is and does from what you told me the last time when you showed me. Which took an hour of my time.
Him: so he sent me this code which is called <Descriptive name> and in the method we have variables call <descriptive name> and it returns a <variable name>
Me thinking: You mother fucker! I don't give a shit what your method is named, what it the variable names are, and you don't need to read through every line of code to me! Just from the descriptive name you just said I know what it does! What the fuck is your issue!?
Him: we also have these other methods. This one is called <Descriptive name> which does...
Me: are you fucking seriously going to read me your code line by line and tell me what you named your variables AGAIN!?
Him: and we named this one <descriptive name>
Me: you mother fucker...
Him: and it calls this stored procedure. (Literally opens the stored procedure and shows me) and it is called...which has parameters called... And it is a select query that inserts
45 minutes later after he finishes explaining all 3 pages of his code and his 5 stored procedures that the other dev wrote...
Him: So anyway, back to this method. I need to know where to put this method. The other dev said to put it in this file, but where do you think I should put it in here? Should I place it after this last one or before it?
Me thinking: You fucking wasted my fucking time just to ask where to place your mother fucking method that the other dev sent to you in a project with only 3 files, all less than 500 lines of code with comments and regions that actually tell you what you should put there and 5 small stored procedures that were not even relevant to your issue! Why the fuck did you need to treat me as a rubber ducky which would fly away if you did have one because you didn't have an issue, you just didn't know where to put your fucking code! FUCK YOUR METHOD!
Me: Where ever you want
Him: Well I think it won't work if I placed it before this method.
I walked away after that. What a waste of time and an insult to my skills and really unchallenging. He's been coding for years and still can't understand anything code related. I'm tired if helping him. Every time he needs something he always has to read through and explain his shit just to ask me things like this. One time he asked me what to name his variable and another his project. More recently he asked why he couldn't get his project he found online to work. The error clearly stated he needed to use c# 7. His initial solution was to change his sql connection string. 😑
He should just go back to setting up computers and fixing printers. At least then he would never be in the office to bug me or the other dev with things like this.7 -
Worst fight I've had with a co-worker?
Had my share of 'disagreements', but one that seemed like it could have gone to blows was a developer, 'T', that tried to man-splain me how ADO.Net worked with SQLServer.
<T walks into our work area>
T: "Your solution is going to cause a lot of problems in SQLServer"
Me: "No, its not, your solution is worse. For performance, its better to use ADO.Net connection pooling."
T: "NO! Every single transaction is atomic! SQLServer will prioritize the operation thread, making the whole transaction faster than what you're trying to do."
<T goes on and on about threads, made up nonsense about priority queues, on and on>
Me: "No it won't, unless you change something in the connection string, ADO.Net will utilize connection pooling and use the same SPID, even if you explicitly call Close() on the connection. You are just wasting code thinking that works."
T walks over, stands over me (he's about 6.5", 300+ pounds), maybe 6 inches away
T: "I've been doing .net development for over 10 years. I know what I'm doing!"
I turn my chair to face him, look up, cross my arms.
Me: "I know I'm kinda new to this, but let me show you something ..."
<I threw together a C# console app, simple connect, get some data, close the connection>
Me: "I'll fire up SQLProfiler and we can see the actual connection SPID and when sql server closes the SPID....see....the connection to SQLServer is still has an active SPID after I called Close. When I exit the application, SQLServer will drop the SPD....tada...see?"
T: "Wha...what is that...SQLProfiler? Is that some kind of hacking tool? DBAs should know about that!"
Me: "It's part of the SQLServer client tools, its on everyone's machine, including yours."
T: "Doesn't prove a damn thing! I'm going to do my own experiment and prove my solution works."
Me: "Look forward to seeing what you come up with ... and you haven't been doing .net for 10 years. I was part of the team that reviewed your resume when you were hired. You're going to have to try that on someone else."
About 10 seconds later I hear him from across the room slam his keyboard on his desk.
100% sure he would have kicked my ass, but that day I let him know his bully tactics worked on some, but wouldn't work on me.7 -
My Task: Create a new application in a custom C#-Framework, to replace screens from the old application.
Me:Fine.
The old application has a Java Frontend.
Me:Fine.
The old application has an Oracle-DB.
Me:Fine.
The old application has its logic fully on the DB.
Me:What ??
You cannot connect to the DB via ODBC.
Me:But why ???
You cannot use external libraries, just our framework.
Me: For what are you thinking i can use to call the functions on the DB
You have to use a custom connection-bus which uses JDBC
Me:Fine.
This connection-bus cannot call SQL Statements and return the result.
Me:WTF, how should i get the data out of the Database ?
We don't know find a way.
Me:Ahh fuck off.3 -
FUUUU!!!!!! 3h of colleagues work gone in sconds.. & yes, actually it is all my fault, even though I was not aware of being a totall ass at that time..
What happened?! You know the ctrl+s shortcut?! Yes? Weeeell...doesn't go well with oracle sql developer and packages.. o.O
I was totally unavare that I was typing in ctrl+s ctrl+s all the time. I know I do that with c# code.. Anyhow, when I first moved to sql developer from other tool I noticed that compile thingy.. Oooops, ok, let's remove that shortcut to not stab yourself absentmindenly and overwrite other peoples work.. OK that's taken care of, shortcuts removed and I go back to work..
It's been almost 6 months since the move & first incident and today I guess I did the same.. ctrl+s.. But this time I wasn't so lucky.
Coworker pissed off, that is not my procedure. When did you compile?! Someone overwrote my code..
Wasn't me.. Then I started thinking about ctrl+s.. OMFG!! I check this on another package, it compiled. O.o I almost died. I check the shortcuts. They are back! And even after removing them the package still compiled.. FML!! 😭😭😭😭
I removed them again & closed the tool. Reopended.. BACK!! We're back to fuck your life up!! Fuuuuuuu!!
Now I worry wtf else I fucked up without notice.. o.O hopefully not much.. I hope.. O.O boss will kill me...
BTW anyone knows how to really get rid of this feature?! Cuz for me its a bug (since I am buggy and press ctrl+s all the time.. )6 -
Sent a fully constructed sql statement to someone expecting at least 4 rows however received reply "the result is empty" with a screenshot of empty result set from sql-developer. I kept cross-checking the where clause thinking I mixed something up.
After a few back and forth emails suddenly noticed the screenshot I received initially and I see all of the strings in where clause are lowercase. I reference my version and it is correct. When I asked her why are the strings in sql lowercase and that if she has tried the exact sql I sent in the email, the response "I didn't think it mattered what case the sql was in".
I am lost for words. The worse part is, this is someone who is supposed to go on site as part of their job and help clients setup, explain and train how the software works. This includes explaining how software intreacts with database tables 🤐8 -
procrastinating by getting drunk since 11:00 AM, and writing specs for my (hypothetical) language/os/platform.
feeling righteous retribution because the client made me be stressed for 3 hours due to an issue that THEY caused but for 3 hours the only info I had was "there's a critical blocker issue and we're convinced YOU caused it"
well... no... i did NOT cause the fact that you UPGRADED PHP DURING THE WEEKEND BEFORE MONDAY'S PRESENTATION TO CLIENT (while waiting for an urgent commit from me).
seriously.
also, germans. i've heard many times from other people that they're... basically racist towards us (slavic nations), thinking of us as untermensch, coal-miner peons, but I didn't realize their passive-aggressive covertly smug demanding attitude is due to this, I just assumed it's a reaction to me being incompetent.
so yesterday when we finished the call (in preparation for which I tried to switch to their "client demonstration" branch since that's where the error was, and I wanted a headstart on fixing it, ended up in a place that my today's whole-day task should be "rebuilding the DB into working condition", because there's about 10 "core" sql scripts in two different folders, which need to be run (in a very specific order, of course, which readme tells you, but what it tells you has been outdated at least for 3 months, of course), and
...THE MAIN CORE SCRIPT THAT IS THE FIRST TO RUN, THAT CREATES THE DB schema, HAS THREE SYNTAX-LEVEL typos which fail it mid-way...
...the joys of continuous deployment via scripts, I guess? I would love to challenge any person from them to screenshare to me, manual deployment of the current version from zero, and I would be willing to give the person 20% of my monthly salary if they would be able to do it within 20 minutes.
but... well...
the point is, i should be doing not entirely bullshit stuff.
but yesterday's 6 hours of being in "at full attention because it seems we fucked up" totally convinced me, that today I'm taking a break.
So I'm gonna go buy another 3 beers and continue writing the specs of my dream language/os/platform.19 -
web technologies rot your brain into a festering deadly biohazard mush. web technologies are the worst thing that ever happened to this world. fucking festering web shitosystem fuck this disgusting stupid fragile opaque bloated universe-sized chunk of retarded pukeshit.
I JUST WANT TO MAKE FUCKING GAMES, NOT HAVE MY BRAIN AND SOUL CONSTANTLY ROTTED BY THIS FUCKIN MONUMENT TO UTTER RETARDED LOBOTOMIZED HUMAN INCOMPETENCE FUCK YOU ALL FUCK ALL THIS SHIT FUCKFUCKFUCKFUCK DISGUSTING FUCKIN MINDRAPE PEDOPHILIACS SHOULD STOP FUCKING "INVENTING" SHITPOOLS.
WHEN
THE
FUCK
WILL
SOMEONE
COMPETENT
BE
THE
INVENTOR
OF
SOME
PIECE
OF
IT.
whoever were the rapists who "invented" php, js, html, css, SQL, and all the bullshit about how it's supposed to be configured and communicate with each other should have died of starvation in a fuckin ditch while being raped by squirrels... before they managed to "invent" any of that disgusting shit.
fuck you with your fuckin linux bullshit philosophy which keeps rotting all your brains thinking that this is fine and it can be fixed just by piling more and more layers of fucking shit on top of all this shit.
FUCK.
YOU.
ALL.19 -
I'm so fkin happyyyyyy!!
2 months ago a friend hits me up and says "lets make a fkin website"
I had no knowledge of web dev and didn't take it seriously cuz "web dev is for losers who can't code, also they get paid in peanuts" as stated by someone I highly respected back in school.
Fuck him.
It's all changed.
I never thought I'd say this.
But web dev is the best thing I've picked up in 3 years
Been making steady progress in js, php, sql then picked up jquery and made a few dynamic test sites. God it was so fkin satisfactory. Started node- it's intimidating but I'll get the hang of it soon and thinking of starting vue or ember as soon as I'm confident in all the stuff I've picked up. Oh and friend's website?
Fuck that it's a trash concept. I still thanked him for getting me to start web dev and moved on.
I still have my roots in c++ and Python and I'll never forget them but I think this may be the start of a wonderful journey. Be sure to burst my bubble I'm just a noob now10 -
¡rant|rant
Nice to do some refactoring of the whole data access layer of our core logistics software, let me tell an story.
The project is around 80k lines of code, with a lot of integrations with an ERP system and an sql database.
The ERP system is old, shitty api for it also, only static methods through an wrapper to an c++ library
imagine an order table.
To access an order, you would first need to open the database by calling Api.Open(...file paths) (yes, it's an fucking flat file type database)
Now the database is open, now you would open the orders table with method Api.Table(int tableId) and in return you would get an integer value, the pointer.
Now for the actual order. first you need to search for it by setting the search parameter to the column ID of the order number while checking all calls for some BS error code
Api.SetInt(int pointer, int column, int query Value)
Then call the find method.
Api.Find(int pointer)
Then to top this shitcake of an api of: if it doesn't find your shit it will use the "close enough" method of search.
And now to read a singe string 😑
First you will look in the outdated and incorrect documentation given to you from the devil himself and look for the column ID to find the length of the column.
Then you create a string variable with ALL FUCKING SPACES.
Now you call the Api.GetStr(int pointer, int column, ref string emptyString, int length)
Now you have passed your poor string to the api's demon orgy by reference.
Then some more BS error code checking.
Now you have read an string value 😀
Now keep in mind to repeat these steps for all 300+ columns in the order table.
News from the creators: SQL server? yes, sql is good so everything will be better?
Now imagine the poor developers that got tasked to convert this shitcake to use a MS SQL server, that they did.
Now I can honestly say that I found the best SQL server benchmark tool. This sucker creams out just above ~105K sql statements per second on peak and ~15K per second for 1.5 second to read an order. 1.5 second to read less than 4 fucking kilobytes!
Right at that moment I released that our software would grind to an fucking halt before even thinking about starting it. And that me & myself and I would be tasked to fix it.
4 months later and two weeks until functional beta, here I am. We created our own api with the SQL server 😀
And the outcome of all this...
Fixes bugs older than a year, Forces rewriting part of code base. Forces removal of dirty fixes. allows proper unit and integration testing and even database testing with snapshot feature.
The whole ERP system could be replaced with ~10 lines of code (provided same relational structure) on the application while adding it to our own API library.
Best part is probably the performance improvements 😀. Up to 4500 times faster and 60 times less memory usage also with only managed memory.3 -
So I'm finally doing the job I was hired to do 2 years ago, with the promise of working 1.5 years ago, and scheduled to work 1 year ago as the project slips about a 1.25 years.
The project is on it's 3.5th year of a 3 year plan and based on the architecture of the project, the project architect started a degree in software architecture 4 years ago. In Latin. When his first language was Japanese and his second was Indian English while this was a US company. And his entire degree was in Lisp, PHP, and html, this project is in C#, and his professional background is in Fortran.
This is a man who is no longer on the project, not allowed to contribute or talk to us about the project, and what little documentation he left us is in Swahili translated from Korean via Google translate from the second year Korean language major exchange student from Russia who got really into meth and Telenovelas.
It is every version of MV* without the M and with every definition of * including some he made up and some that have only been proven to exist via machine learning algorithm written in SQL statements.
This project represents an implementation of the presentation tier of an n-tier application, yet attempts to reimplement the other n-1 tiers in html5 and the dreams of children.
The new lead is a former engineer that couldn't begin coding until he figured out how to map all of his variables to his former cars and girlfriends inclusively and learned his management skills from the big book of micro managers and that one time everyone else in the office was sick but the intern. Who now has a girlfriend whom he works 200 feet from so he isn't 100% thinking with his largest head. At least from observation.
Yet, I still can't bring myself to go be with the whales/become an accountant. -
Even seniors make mistakes. In case you were ever doubting yourself - just remember that.
I just had a very senior level programmer on my staff add a function to a production system that issues an SQL UPDATE query without a WHERE clause. Fortunately, only the 1st entry succeeded and the rest failed due to "duplicate record" errors. Clearly he had intended to do a SELECT to check if an entry was present. If it was present, do an UPDATE, otherwise do an INSERT (think UPSERT - but done manually). However instead in the insert part they were both UPDATE's. The first update was normal looking but the second UPDATE was just this weird malformed-looking thing where he tried to do an UPDATE but to every field including the key fields. Clearly he was thinking about an insert but actually writing it as an update. Every now and then I need to remind myself that these things happen. The guy's not dumb - just made a mistake.
I'm just happy it "failed unsuccessfully".4 -
Happened a few ago when I started taking SQL classes in school. We had our theory exam with one question asking us to display the date of the following day. And since I knew dick about working with date, I decided to make the computer sleep for 86400 seconds and print current date (which was like the only command I knew about dates).I feel really stupid thinking about that now.. but it was fun :P3
-
4 really basic questions. Things you can't get through 1st year undergrad without knowing. One was testing you understand references, one testing understanding of inheritance, then exception handling... Then a bit of a tricky one: what happens when you query 2 tables in sql without a join. That took me a second because it's just not something I'm used to doing.
So yeah it's pretty basic stuff. At this point I was used to writing fairly long code snippets and quizzes with lots of gotchas that make the interviewers feel really smart. I think "ok they basically want to make sure I'm not totally useless and they're fine with training me". But noooooo. Being able to answer all that correctly is really impressive. That's never happened before. I'm a fucking prodigy.
So I got the job and I alternate between thinking I'm in Idiocracy and thinking the reception I get is some sort of elaborate joke -
I'm a self-taught frontend developer with 1,5 - 2 years of experience in JavaScript / Vue.js development. Pretty cliche in 2023 and I can actually feel this now when it comes to the job market. It's brutal at the moment.I moved to Germany for a specific job but got laid off a few weeks ago due to a lack of projects and actual things to do. And here I am right now: tons of job applications, 4-5 interviews a week, zero success.
I'm thinking about getting some warehouse job or anything for the time being, and start freelancing in my spare time. Instead of this oversaturated JavaScript landscape, I would get into PHP (not as "hip" so less competition, backend, no new tools every 6 months), SQL, or hyper-specialize in CSS - something I like quite a bit but have seemingly zero value to employers.
I actually made a simple website for a small business when I was getting started with frontend, and he was super happy with the end result. I also did some language tutoring, that was quite rewarding as well. So freelancing is definitely fun, I enjoyed it much more than fearing layoffs or trying to force a fake-ambitious attitude on my 30th interview that most probably won't lead me anywhere. :D
Is the frontend job market really this oversaturated? (I know, I know... It's not difficult for competent, skilled, and experienced devs with CS degrees) Is being a CSS specialist, PHP-developer, or SQL-magician on fiverr/upwork/etc. a viable freelancing path? I've heard good and bad about these platforms, the competition there, etc. If not, where should I start?
What do you think? Any input is much appreciated. :)4 -
How do you restore partial data from a mysql backup? Don't worry, nothing is wrong, I'm just thinking about how would I restore something if shit hits the fan.
Our current strategy for database backups is to just run mysqldump during the night, using a cronjob (feel freue to suggest a better way ;))
1) Restoring the full db: just read that sql file into the mysql command.
2) Restoring just one (or some) tables: open the file in an IDE, just select the lines you're after, copy them to a new file, read that one (possible issues: let's say we have a table B to which entries of table A are related and we just want to restore table A. We can't nuke table B too, as also table C is refering to it, so we have to do some orphant removal in B afterwards)
3) Restoring selected entries in specific tables: setup a new db, read the full backup in there, dump these entries to a new file and read that into the real db
How do you so it? Any better aproaches/tools?8 -
I like the people I work with although they are very shit, I get paid a lot and I mostly enjoy the company but..
Our scrum implementation is incredibly fucked so much so that it is not even close to scrum but our scrum master doesn't know scrum and no one else cares so we do everything fucked.
Our prs are roughly 60 file hangers at a time, we only complete 50% of our work each sprint because the stories are so fucked up, we have no testers at all, team lead insists on creating sql table designs but doesn't understand normalisation so our tables often hold 3 or 4 sets of data types just jammed in.
Our software sits broken for months on end until someone notices (pre release), our architecture is garbage or practically non existent. Our front end apps that only I know the technology have approaches dictated by team lead that has no clue of the language or framework.
Our front end app is now about 50% tech debt because project management is so ineffectual and approaches are constantly changing. For instance we used to use view models for domain transfer objects... Now we use database entities, so there is no commonality between models but the system used to have shared features relying on that..sour roles and permissions are fucked since a role is a page regardless of the pages functionality so there is no ability to toggle features, but even though I know the design is fucked I still had to implement after hours of trying to convince team lead of it. Fast forward a few months and it's a huge cluster fuck to enforce.
We have no automated testing of any sort or manual testing in place.
I know of a few security vulnerabilities I can nuke our databases with but it got ignored.
Pr reviews are obviously a nightmare since they're so big.
I just tried to talk to scrum master again about story creation since any story involving front end ui as an aspect of it is crammed in under one pointed story as sub tasks, essentially throwing away any ability to calculate velocity. Been here a year now and the scrum master doesn't know what I mean by velocity... Her entire job is scrum master.
So anyway I am thinking about leaving because I like being a developer and it is slowly making me give up on doing things to a high standard and I have no chance of improving things, but at the same time the pay is great and I like the people. -
Anyone tried converting speech waveforms to some type of image and then using those as training data for a stable diffusion model?
Hypothetically it should generate "ultrarealistic" waveforms for phonemes, for any given style of voice. The training labels are naturally the words or phonemes themselves, in text format (well, embedding vectors fwiw)
After that it's a matter of testing text-to-image, which should generate the relevant phonemes as images of waveforms (or your given visual representation, however you choose to pack it)
I would have tried this myself but I only have 3gb vram.
Even rudimentary voice generation that produces recognizable words from text input, would be interesting to see implemented and maybe a first for SD.
In other news:
Implementing SQL for an identity explorer. Basically the system generates sets of values for given known identities, and stores the formulas as strings, along with the values.
For any given value test set we can then cross reference to look up equivalent identities. And then we can test if these same identities hold for other test sets of actual variable values. If not, the identity string cam be removed, or gophered elsewhere in the database for further exploration and experimentation.
I'm hoping by doing this, I can somewhat automate the process of finding identities, instead of relying on logs and using the OS built-in text search for test value (which I can then look up in the files that show up, and cross reference the logged equations that produced those values), which I use to find new identities.
I was even considering processing the logs of equations and identities as some form of training data perhaps for a ML system that generates plausible new identities but that's a little outside my reach I think.
Finally, now that I know the new modular function converts semiprimes into numbers with larger factor trees, I'm thinking of writing a visual browser that maps the connections from factor tree to factor tree, making them expandable and collapsible, andallowong adjusting the formula and regenerating trees on the fly.7 -
Need advice. I run all my development on a desktop that I have been happy with for years. Now it keep crashing (probably due to forti client which I need for a contract).
I am frozen in looking for a replacement. Will a laptop give me the freedom I want but not enough power and USB options? Will I be wasting 1000k buying one?
I do all sorts of dev: visual studio, eclipse, PHP, c#, Apache, IIS, SQL server, MySQL.
I pretty much have to be prepared for anything.
But I keep thinking a laptop will give me this mobility that I may never use.
I probably should stick with a desktop.3 -
Pardon the rant; some of it can probably attributed to me, but please indulge me of you could.
I'm tasked with creating a report that pulls data from some sql tables in c#and presents it using javascript. My manager was nice enough to lend me his old sql query, so I run with that using sql connections. Now I find out AFTER I get my sql query string working and retrieving data properly that my manager wanted it done using linq and entity framework, so now I have to start over, a process made only more "fun" by the confusing and unintuitive column names of our sql tables.
Moral of the story: don't take the easy way out.
After I spend some time fixing that up, I have to print out the data using javascript and html, which my manager was kind enough to lend me. Cue me shutting off my brain and thinking that I should have the program open and display this stuff itself. Let me tell you that converting a console application to a Windows form application is not a fun experience, especially when entity framework makes classes named "application" and "form" from your database tables. After finally getting the WebBrowser form to work, I'm hit with a javascript error from the library my manager referenced (he is a programmer himself). I tell him about the error and he just tells me to write the html code to a .html on disk like he did, but never explicitly said he did until just now.
Fixed moral of the story: don't take the easy way out, unless you should.
I should clarify I was given the whole raw sql query and html with some embedded javascript and a reference to chart.js. -
So i have been thinking..
SQL is a lang that runs on a specific software on the server, and helps creating data stores(databases and tables) that can be queried & manipulated.
is there a way to run sql like queries on the client side with no interaction from backend at all?
Say i have 5 inter related data models. in a backend world, they will form nice little tables of a db with all their joins and composite keys. from the server, i shall be querying them like "SELECT name from x where y=z & ..."
but what if i could store them like tables in browser memory and run the same query filters via a query language... is this possible?
i know this poses a certain security risk, but we already use cookies, local storage and a lot of json based shitty client side storages. surely it might be possible to have a lesser optimised sql tables on the frontend with extremely good querying capabilities?
or am i talking something far fetched here?8 -
Question to the freelancers here.
How long did it take you to make a living with freelancing and did you start freelancing fulltime right away or 20-40% besides another job?
I'm thinking about freelancing for a while now, but I guess in the beginning the money coming in will be really unpredictable, right?
About me, I'd call myself a senior level developer (Java, JS, SQL and stuff like that). -
SQL is amazing.
I'll toss out some bassakwards query and the optimizer will make sense of it and suddenly I'm searching a amazonillian records in no time.
Then rando one day (today) I fire up what I think is really not the most wonky query I've ever written and ... "Well shit this is surprisingly slow."
So then I go full n00b and add some fields to the query that I know would limit the number of possible records to way low thinking that might help and ... nope no faster...
Guess it's time to bust open some books about SQL....4 -
> me: trying to explain to a dev from one of our customers why should they worry about sql injection in their application -which by the way is public- since they always concatenate params (even giving concrete examples in their app on how could I gain acces to their database with just a couple of queries)
> me: (thinking) Did I change my bed with a time machine by accident and got myself into the past?
Do these things happen often to you? (U_U||) -
Cross post from /r/cscareerquestions
Hey guys how are you all doing!?
I got into university this September (Computer Engineering & Informatics).
Although I've been programming java since I was 14 (github.com/zarkopafilis), discussions with a friend who is a dot net guy and has been working full-time C# for 2 years now got me thinking.
Alright, Java's good. I've learned to love and hate the language. I also like Spring Boot and whole this ecosystem of stuff including Scala and the other Java based languages. Currently I'm in the proccess of completing some personal project of mine.
Alright, here's the big question: Assuming I am going to graduate (and start working) in 5-7-8 years (Masters, PhD - who knows), which language would you suggest I stick with and start learning? - for backend programming of course.
Don't tell me JavaScript. Although I don't like it I've digested the fact that I'll have to learn some of it for sure.
Currently that's what I'm thinking: Invest some more time learning how the JVM works (and probably keep improving my code quality). Also learn some more stuff regarding Spring Boot (and/or Web Services in general). Then advance onto Scala till couple of years pass. In that time I shall keep improving my SQL skills.
On the other hand I may start learning C# along with .NETcore .
Sidenote: Personally I prefer statically typed languages, that's why I dislike stuff like js and python although I occasionally find myself fiddling with small projects like some laser tracker written with python + opencv.
Sorry if this reads like a big disorganized dump of thoughts. Thanks in advance! :)3 -
public function index(Request $request): array
{
$parameters = json_decode($request->get('lazyEvent'), true);
if (isset($parameters['page'])) {
$page = $parameters['page'];
} else {
$page = 0;
}
$queryBuilder = DB::table('companies')
->leftJoin('company_contact', 'company_contact.company_id', '=', 'companies.id')
->groupBy('companies.id')
;
if (isset($parameters['filters']['name'])) {
$queryBuilder
->where('name', 'like', '%' . $parameters['filters']['name']['value'] . '%')
;
}
$total = $queryBuilder
->count()
;
$companies = $queryBuilder
->select('companies.id', 'name', 'email', 'phone', DB::raw("COUNT('company_contact.id') AS contact_count"))
->orderBy('name')
->offset($page * $parameters['rows'])
->limit($parameters['rows'])
->get();
return ['companies' => $companies, 'totalRecords' => $total];
}
what is this shit? I get $total 1 when in reality is $companies count is 51
I am thinking avout writing whole sql as raw because I cannto get fucking count correctly21 -
Rant 1
---
I have so much shit to talk about and its annoying to wait 2+ hours between each rant just to rant so ill start off by ranting about not being able to rant as often as i want to rant
Rant 2
---
What is ORM doing under the hood if it makes the queries so much slower than compared to writing raw sql?
Rant 3
---
Im thinking of creating more accounts just to be able to say what i want to say without waiting these dumbass 2+ hours. Who tf even made that and thought it was a good idea. Ur not saving ur bandwidth storage by making devs wait to rsnt bro itll be the same shit
Rant 4
---
Now by writing 3 rants in a row i forgot what i wanted to rant about more and its an enitrely different topic so ill rant about not remembering what i wanted to rant about because of devrants dumbass 2+ hour wait logic
Rant 5
---
Wow this new york company looking for senior devops dev requires a lot less shit to know compared to the saudi arabian shithole company for the exact same position. But how do i learn all of what they require fast so i can apply for this position since the recruiter has contacted me20 -
Hi guys !
I start "studies" to become Web Developer and after 1 month and a half of studies, my teacher asks us to create our first project in groups of 3 or 4. Do you have any ideas of what kind of project we could build? I was thinking of an e-commerce site with our knowledge (HTML5, CS3, a bit of JavaScript, SQL, a little PHP ($ _SESSION, $ _POST and $ _GET) and CRUD).
Is it a good idea?9 -
!Rent
I am working on an app project and our server guy just got fired. I am thinking about switching to a baas like parse but I need a sql database in a background. Do any of you guys know a different baas ?1 -
Me, thinking of removing clothes from the drying line: "you need to insert the clothes into the house"
-
Not a rant, but seeking advice...
Should I abandon 2 years' worth of work on migrating a personal project from SQL (M$) to a Graph database, and just stick to SQL? And only consider migrating when/if I need graph capabilities?
The project is a small social media platform. Has around ~50 monthly active users.
Why I started the migration in the first place:
• When researching databases, I read that for social media, graph is more suitable. It was, at least in terms of query structure. It was more natural, there were no "joins", and queries were much simpler than their SQL counterparts.
• In case the project got big, I didn't want to have to panic-deal with database issues that come with growth. I had some indexing issues with MSSQL, and it got me worried that at 50MAU I'm having these issues, what would happen if I get more?
• It's a personal project, and the Gremlin language and graph databases looked cool and I was motivated to learn something new.
----
Why I'm considering aborting the migration:
• It's taking too damn long. I'm unable to work on other features because this migration is taking up all my free time. Sunk cost fallacy is hitting me hard with this one.
• In local testing within docker, it's extremely slow. I tried various graph engines (janusgraph, official tinkerpop, orientdb), and the fastest one takes 4-6minutes to complete my server tests. SQL finishes the same tests in under 2 minutes, same docker environment. I also tried running my tests on a remote server (AWS neptune) and it was just as slow. Maybe my queries are bad, but can I afford to spend even more time fine tuning all queries?
• I now realise that "graph = no scalability issues" was naïve of me, and 100% wishful thinking. Scalability issues don't care what database I use, but about how well tuned and configured the whole system is.
• I really want to move on. My tech stack is falling behind and becoming outdated. I'm unable to maintain dependencies.
• I'm worried about losing those 50 MAU because they're essential to gaining traction once I release the platform. I keep telling them about the migration but at some point (2 years later) they're going to get bored I feel.
I guess partially it's a rant because I feel like I shouldn't stop now having spent 2 years on this, but at the same time I feel like I'm heading towards a dead end.
If you made it this far, thank you for reading:)10 -
I got situation here,
I am getting 524 error from cloud fare. I sent some data using AJAX, process it and then return the result. Since the data is large and have some SQL manipulation on it so it take a lot of time. I put the process in back end. But still even for 10k records it took 4-5 minutes to process, Issue is everything works fine but since cloud fare response time is 1-2 minute so it through 524 error (as it does not getting any response within its time frame). How I am suppose to tackle this. May be using job scheduler now ? My client simply refuse to send small data. My Friend is suggesting don't use ajax, simply reload the page. But again data is too much so page loading will also through 524 error. Kindaa stuck here. Any idea/suggestion how I can proceed.
Language I am using PHP. Database, MySQL and SQL.
Hmm Here is some more explanation
https://github.com/marcialpaulg/...
But not working
Here is also something
https://stackoverflow.com/questions...
But I am thinking why redirecting ? It doesn't make sense to me7 -
Thought that it might be a good idea to ask this question here.
Im looking for a nice logging events service for a side project that is a b2b (so my clients got their own users). My targets are tracking users behavior/events/actions in the app while been able to shred the data that belongs to each customer. A great benefit would be having a solution that would allow me to export part of the data (in sql like way) so i could provide the users the option to download their users data as well.
Was thinking about mixpanel but i dont think they have any option to export the data via api. Heap analytics is also an interesting one, but their nice features are limited to corporates..
Any suggestions? Thanks!4 -
So, I am in the last stages of development of a really big project and I need to figure out a way to package future patches and updates for the client in order for them to manually update the project on prod server.
For reasons I cannot specify here, they will not use any automated process, and we need to provide regular patches and updates for the next year.
So I was thinking of using git archive to package changed files from our repo for every new commit, or series of commits, and just give them that, along with any database schema updates as sql files (again, no automation can be used).
We are talking about a large PHP + MySQL app, and cannot use automated deployment strategies.
I feel there must be a better way to do this, but this is the best I could come up with so far.
What do you people think?
Any ideeas?