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 - "helper"
-
A rare bug appeared. It was my duty to finish it.
SH = Manager
SH: So when do you think you can finish the task?
Me: I still have to analyze the problem. Give me a moment and I'll get back to you.
SH: Alright.
*An hour later*
SH: *Approaches my desk* Have you found the source of the problem?
Me: Not yet. Please give me some more time.
SH: Ok.
*An hour later*
SH: *the approach* You found it yet?
Me: Yes, I've found the the source of the problem, But... *explains the problem and thus concluding that it's a complicated bug*
SH: Can you finish it by tomorrow?
Me: I'll do the best I can but I am not entirely sure if I can finish it by tomorrow.
SH: OK great!
*The next day*
SH: *Le approach* Hey I have a colleague here that may be able to solve the problem, he has skills with XYZ. Ok, I will leave you two at it then. *the leave*
Helper: So can you tell me about the issue here?
Me: *explains the bug and the source of the problem*
Helper: Have you tried solution A?
Me: Yes sir, but it yields a different output... *explains what happened with solution A*
Helper: Well, that won't work. What about solution B?
Me: I've tried that, too. *Another lengthy explanation*
Helper: Welp, ok. I'll get back to you on that.
(...But he never came.)
*A few hours later*
SH: *A.P.P.R.O.A.C.H.* Hey I have this team lead from another department. I think he can help you out on this one. *L.E.A.V.E.*
Helper 2: What seems to be the problem?
Me: *Explains again with all the solutions I tried but failed*
Helper 2: Wow. That really seems to be a complicated problem.
~~
Me (In my head): -_-
~~
Helper 2: Listen, I need to get back to my team. I'll keep you posted if I happen to find a solution for your problem alright?
Me: Alright thanks.
*Towards the end of the day*
SH: *APPROACHHHH* Have you resolved the bug yet?
~~
Me (In my head): You made me spend half the FUCKING day explaining to these people who didn't even give a piece of FUCKING SHIT to contribute to the problem and you are asking me if I am done with this FUCKING BUG? FUCK YOU, YOU SON OF A -
~~
Me: No, it is not finished yet..
SH: You have to finish this because we don't have tomorrow.
~~
Me (In my head): SHDIFHWISGSIFGSISBAUDBEIQBDIWGFIEBWIDHWIQBDOSBCISBDOSHDIAGSUSVDIFBDKDJWIQKDBDIDGSUWVDIABDIXBSIDBDIDBWUWGUSVDUWVDJQBDUDVWISHDUWVFG
~~
I went home for the day.21 -
So, in my spare time I run a little helper business that teaches children/teenagers how to program.
Theres a new kid that's been coming for around about a month, and I swear the kid is a programming deity.
He picked programming and more importantly developing remarkably quickly.
Long story short, I paid for him to go to a Hackathon in LA and he now has more business contacts than me.19 -
Learned Python by working 6 year with it. The first tool I made in my spare time was a porn playback helper.6
-
So... I just remembered a story that's perfect for devrant.
My brother got into engineering in university, and during the second semester they had their introductory class to programming. They had weekly homeworks that the lecturer would check and give grades accordingly.
The factors that could influence the grading were: execution (meaning that the code would excecute as intended), efficiency and readabilty. The weeks passed and everyone was doing well, getting fairly good grades. Everyone was happy.
Until one day a random guy we'll call bob got the worst grade possible. Bob wasn't a bad student. He had over-the-average grades in all the weekly homeworks and even impressed the professor in some. Naturally, he was baffled when he saw his grade on the google spreadsheet. He was pretty sure his code ran well. He always tested it on different machines and OSs. So, at the end of the class, he went straight to the helper of the class, in a pretty imperative manner, to demand to know how the fuck he got that grade. It's impossible he got excecution, efficiency and readabilty, wrong. All three wrong? Impossible. Even the stupidiest kid in the class had some points on readabilty.
"Oh, so you are Bob. Huh?" said the helper in a laid-back attitude. "Come with me. Prof. X is waiting for you in his office."
This got Bob even more confused. As they approached the office, the courage he had in a first moment banished and gave way for nervousness and fear.
The helper nocks the door. "Prof., Bobs here"
As soon as Bob sits in the chair in front of Prof. X's, he knew something bad was coming.
"In all these years of teaching..." said Prof. X hesitantly. "In all these years of teaching I have not come even close to see something similar to what you've done. You should be ashamed of yourself." Needless to say, Bob was panicked.
"In all these years I have not seen such blatant mockery!" added the professor. "HOW THE FUCK DID YOU EVEN DARE TO SEND A HOMEWORK WITH SUCH VARIABLE NAMING" That's when Bob realised the huge mistake he made. "NEVER IN ALL THESE YEARS I HAVE SEEN SOMEONE NAME HIS VARIABLES *opens the file on his desktop *: PENIS, SHIT, FUCKSHIT, GAYFUCKING<insert Prof. X's name>MAN, GOATSE, VAGINAVAR, CUMFUNCTION, [...]" The list of obcenities went on and on. In each word, the professor hit the table harder than the last time.
Turns out Bob felt so in comfort with the ease of the course he decided to spice things up by using "funny naming conventions" while coding, and then tidying everything up before uploading the homework. This week he forgot, and fucked it big time.
So remember folks, always check your code before committing/giving it in/production. And always adhere to naming conventions.9 -
I actually just wanted to say - what a great time it is to be a developer.
C# has stolen so many good features now that it's pretty awesome.
JavaScript and typescript are really fun to work with.
I really love angular.
Docker is great!
I can setup pipelines and deploy an angular app for free and really easily with github-pages.
I can use linux inside windows.
I can use cloud providers to do all sorts for really cheap.
I can plug my cable-free oculus quest VR headset into my laptop and build a game pretty easily with unity (thanks to all the great oculus helper prefabs).
I can use tesseract and data science technology inside my browser!!
And I can go to medium and udemy and learn all sorts of things.
Honestly...
Just saying.
I'm actually really loving being a developer right now.
And if I do have off day, I can rant on here!24 -
At an interview, the first round was an online coding round. Two questions, one easy one hard, 90 minutes, easy peasy.
I solved the hard one first.
A bit of good logic, followed MVC pattern, all done. Worked flawlessly.
Submitted code. Online compiler threw up an internal error citing java is an invalid command(jdk not found).
Called the invigilators. What I heard next, I couldn't believe this shit.
"We're not responsible for any errors you may be having. Figure it out yourself"
I was like WTF dude. This is not even a compilation or runtime error!
After a heated discussion, I made him look at the code.
Him - what is all this classes and all? Why haven't you written everything inside the main function?
Me - those are model classes. Those are different helper functions. That is a recursive function to avoid 5 for loops and use divide and conquer. Ever heard of OOP? what kind of person writes a 300 line program inside one function?
Him - no no we write it like that only. Correct this.
Me - I fit everything inside the main function. Still the same error, java not installed. Called the idiot to have a look at it.
Him - yeah your code is wrong.
Me - may I know what's wrong with it? Can you fix it please?
Him - no no we aren't allowed to see the code (he had already read it twice. It was compiling and running perfectly, locally) .
Yeah you solved only 1 problem, you were supposed to solve 2.
Me - yes because the rest of the time I had the pleasure of your company. (It isn't everyday that I see talking buffoons.)11 -
Looking into a helper class written by someone who was clearly not a master of their craft. The class deals with some string IDs...
public getIDPosition1(String id){
return id.substring(0,1);
}
So far so useless. But it gets better. What is declared immediately below the above method?
public getIDPosition2(String id){
return id.substring(1,2);
}
And below that? You guessed it:
public getIDPosition3(String id){
return id.substring(2,3);
}
This continues to position 10.... -.-7 -
I'm currently rewriting perfectly clean and functioning Scala code in Java (because "Enterprise", yay). The amount of unnecessary boilerplate I have to add is insane. I'm not even talking big complicated code but two liners or the lack of simple things like a range from 5 to 10.
Why do I have to write
List<Position> occupiedPositions = placedEntities.stream()
.flatMap((pe) -> pe.occupiedPositions().stream())
.collect(Collectors.toList());
instead of simply
val occupiedPositions = placedEntities.flatMap(_.occupiedPositions)
Why on earth does `occupiedPositions.distinct` suddenly become a monstrosity like `occupiedPositions.stream().distinct().collect(Collectors.toList())` where the majority of code is pure boilerplate? And this is supposed to be the new and better Java8 api which people use as evidence that Java is now suddenly "functional" (yeah no, just no).
Why do APIs that annotate parameters with @Nullable throw NullPointerExceptions when I pass a null? Why does the compiler not help prevent such stupidity? Why do we use static typing PLUS those annotations and it still crashes at runtime like every damn dynamic, interpreted language out there? That's not unfortunate, it's a complete waste of time.
Why is a simple idea like a range from x to 10 (in scala literally `x to 10`) not by default included in Java? There's Guava's version of Range which does not have a helper for integer ranges (even though they are the most used ones). Then there's apache.commons version which _has_ a helper for integers, but is strangely not iterable (wtf I don't even...).
Speaking of Iterable: How difficult could it be to convert an abstract Iterable<T> into a concrete List<T>? In scala it's surprisingly `someIterable.toList`. I found nothing like that so I took to stackoverflow where I found a thread in which people suggested everything from writing your own ListUtils helper class, using Guava (which is a huge dependency!) to using the new Java8 features inline (which is still about three lines long). I didn't know this was such a hard problem in computer science, TIL.
How anyone can be productive in this abomination of a language is beyond me now, even though I've used it for many years while learning to code (back then I didn't know there were much better ways to do things). The only good part is that I have to endure this nonsense for only about 3 days longer then I'm free again!12 -
Tl;Dr - It started as an escape, carried on as fun, then as a way to be lazy, and finally as a way of life. Coding has defined and shaped my entire life from the age of nine.
When I was nine I was playing a game on my ZX spectrum and accidentally knocked the keyboard as I reached over to adjust my TV. Incredibly parts of it actually made a little sense to me and got my curiosity. I spent hours reading through that code, afraid to turn the Spectrum off in case I couldn't get back to it. Weeks later I got hold of a book of example code to copy out to do various things like making patterns on the screen. I was amazed by it. You told it what to do, and it did it! (don't you miss the days when coding worked like that?) I was bitten by the coding bug (excuse the pun) and I'd got it bad! I spent many late nights on that thing, escaping from a difficult home life. People (especially adults) were confusing, and in my experience unpredictable. When you did things wrong they shouted at you and threatened to take you away, or ignored you completely. Code never did that. If you did something wrong, it quietly let you know and often told you exactly what was wrong. It wasn't because of shifting expectations or a change of mood or anything like that. It was just clean logic, simple cause and effect.
I get my first computer a year later: an IBM XT that had been discarded by a company and was fitted with a key on the side to turn it on. With the impressive noise it made it really was like starting an engine. Whole most kids would have played with the games, I spent my time playing with batch scripts and writing very simple text adventures. And discovering what "format c:" does. With some abuse and threatened violence I managed to get windows running on it. Windows 2.1 I think it was.
At 12 I got a Gateway 75 running Windows 95. Over the next few years I do covered many amazing games: ROTT, Doom, Hexen, and so on. Aside from the games themselves, I was fascinated by the way computers could be linked together to play together (this was still early days for the Web and computers networked in a home was very unusual). I also got into making levels for Doom, Heretic, and years later Duke Nukem 3D (pretty sure it was heretic; all I remember is the nightmare of trying to write levels entirely by code!). I enjoyed re-scripting some of the weapons and monsters to behave differently. About this time I also got into HTML (I still call this coding, but not programming), C, and java. I had trouble with C as none of the examples and tutorial code seemed to run properly under a Windows environment. Similar for my very short stint with assembly. At some point I got a TI-83 programmable calculator and started rewriting my old batch script games on it, including one "Gangster Lord" game that had the same mechanics as a lot of the Facebook games that appeared later (do things, earn money, spend money to buy stuff to do more things). Worried about upcoming exams, I also made a number of maths helper apps, including a quadratic equation solver that gave the steps, and a fake calculator reset to smuggle them into my exams. When the day came I panicked and did a proper reset for fear of being caught.
At 18 I was convinced I was going to be a professional coder as I started a degree in Computer Science. Three months later I dropped out after a bunch of lectures teaching what input and output devices were and realising we were only going to be taught Java and no C++. I started a job on the call centre of a big company, but was frustrated with many of the boring and repetitive tasks we had to do. So I put my previous knowledge to use, and quickly learned VBA to automate tasks. It wasn't long before I ended up promoted to Business Analyst where I worked on a great team building small systems in Office, SAS, and a few other tools.
I decided to retrain in psychology, so left the job I was in and started another degree. During my work and placements my skills came in use a number of times to simplify and automate tasks. I finished my degree, then took a job as a teaching assistant while I worked out what I wanted to do next and how to pay for it. Three years later I've ended up IT technican at the school, responsible for the website, teaching a number of Computing lessons each week, and unofficial co-coordinator for Computing as a subject. I also run a team of ten year old Digital Leaders who I am training in online safety and as technical experts; I am hoping to inspire them to a future in coding. In September I'll be starting teacher training with a view to becoming a Computing specialist teacher. Oh, and I'm currently doing a course in Android Development in my free time.
And this all started with an accidental knock on the keyboard of a ZX Spectrum.6 -
I wonder if managers have their own rant app/community?
They'd probably give it some long pointless name, though, like Management Policy Execution Helper or something.1 -
I have a Windows machine sitting behind the TV, hooked to two controllers, set up as basically a console for the big TV. It doesn't get a lot of use, and mostly just churns out folding@home work units lately. It's connected by ethernet via a wired connection, and it has a local static IP for the sake of simplicity.
In January, Windows Update started throwing a nonspecific error and failing. After a couple weeks I decided to look up the error, and all the recommendations I found online said to make sure several critical services were running. I did, but it appeared to make no difference.
Yesterday, I finally engaged MS support. Priyank remoted into my machine and attempted all the steps I had already tried. I just let him go, so he could get through his checklist and get to the resolution steps. Well, his checklist began and ended with those steps, and he started rather insistently telling me that I had to reinstall, and that he had to do it for me. I told him no thank you, "I know how to reinstall windows, and I'll do it when I'm ready."
In his investigation though, I did notice that he opened MS Edge and tried to load Bing to search for something. But Edge had no connection. No pages would load. I didn't take any special notice of it at the time though, because of the argument I was having with him about reinstalling. And it was no great loss to me that Edge wasn't working, because that was literally the first time it'd ever been launched on that computer.
We got off the phone and I gave him top marks in the CS survey that was sent, as it appeared there was nothing he could do. It wasn't until a couple hours later that I remembered the connectivity problem. I went back and checked again. Edge couldn't load anything. Firefox, the ping command, Steam, Vivaldi, parsec and RDP all worked fine. The Windows Store couldn't connect either. That was when it occurred to me that its was likely that Windows Update was just unable to reach the internet.
As I have no problem whatsoever with MS services being unable to call home, I began trying to set up an on-demand proxy for use when I want to update, and I noticed that when I fill out the proxy details in Internet Options, or in Windows 10's more windows10-ish UI for a system proxy, the "save" button didn't respond to clicks. So I looked that problem up, and saw that it depends on a service called WinHttpAutoProxySvc, which I found itself depends on something called IP Helper, which led me to the root cause of all my issues: IP Helper now depends on the DHCP Client service, which I have explicitly disabled on non-wifi Windows installs since the '90s.
Just to see, I re-enabled DHCP Client, and boom! Everything came back on. Edge, the MS Store, and Windows Update all worked. So I updated, went through a couple reboots-- because that's the name of the game with windows update --and had a fully updated machine.
It occurred to me then that this is probably how MS sends all its spy data too, and since the things I actually use work just fine, I disabled DHCP Client again. I figure that's easier than navigating an intentionally annoying menu tree of privacy options that changes and resets with every major update.
But holy shit, microsoft! How can you hinge the entire system's OS connectivity on something that not everybody uses?6 -
Idea was to make a little helper utility to be used once (only for myself, not client). But, I've kept adding layers of functionality over layers of functionality ... Long story short - this monstrosity (UI is bad, code not that much) was used for 10+ years (again, only by myself).
Finally, personal embarrassment was too big, so I took wooden stake and monster passed away. All related files deleted (but not before one final screenshot).6 -
I finally moved to Fedora Silverblue 30 which is a really awesome OS.
Silverblue Edition unlike the standard version, runs a immutable core. That means the entire FS is not writable except for certain parts that are mounted to /var. While this is limiting, this allows for atomic updates, which is the whole point of Silverblue.
Now this also might throw off even myself, because I might need to run VSCode in the host and I might need C++ libs. Fortunately there's a tool named toolbox that allows you to use standard DNF inside a OCI container. Now the thing is, now you need to tell your IDE to use it after installing it.
I wrote a little helper script to do just that. I wrote it primarily for VSCode but it should also work for your IDE if you happen to want to try to use Silverblue.
Helper script: https://t.co/sXYOgcwLBg?amp=1
Also if you wanna try Silverblue for yourself, here's some notes:
* To install apps, you need to run flatpak. Make sure you also have the flathub repo listed.
* don't use the Flatpak version of the IDEs. If possible, use the RPM versions. Silverblue allows you to install traditional packages (to some degree, not everything works in this thing because of the immutable design) in the host. So as much as possible if you need dev libs, use toolbox for those.
* Silverblue also comes with podman and buildah installed (aka what if Docker had no daemon and was more secure?)
*Do your updates via rpm-ostree upgrade, or turn the auto updater on if you're lazy
All in all I like this environment, I've used this kind of workspace before (Chrome OS), so its pretty easy for me to get used to.
What do you think guys, think you'll give it a shot?5 -
Happened last semester, due to lack of admin rights to us students on our computer in OS Lab, a friend wasn't able to start a program. So the OS teacher came and instructed the lab helper to install more RAM on the computer, so that programs cam run without admin access.
We lost all hope of ever understanding OS in class.7 -
And already, I have completed my New Year's resolution! (SPEED RUN!)
I've just published my first completed project!
https://algorythm-dylan.github.io/t...
It allows you to make advanced cross-platform console applications. It's cross-platform curses, basically.
I spent quite a lot of time on the docs, so you can read all about it there. There's still a lot of stuff to do, but the very foundation is there, and it's everything you need(ish). It can just be a little inconvenient at times without helper functions for drawing, or adding strings, and such.
I'm currently binding it to Lua, which is going to be super fun to use!
Happy with this first version5 -
Today a junior dev from the company I'm working at as consultant, suddenly shouted:
😤"why the hell my software behaves differently on every pc here in the office ... But it works on my machine? I'm sure there's something wrong with the OS/Framework"
🤔 let me think for a moment ...
* is it because the whole office keep developing like the ancient romans did?
* is it because that software is such a mess that requires a wizard in order to manually change all the magic configuration strings ?
* is it because every damn developer there has his particular environment and the word "container" reminds you only the show where the people bid for unclaimed shit ?
* is it because the "guru" at your company decided it was a super cool idea to wrap EVERY single external library (that just works out of the box) into some obscure static helper without even a single trace of documentation and clue of what's wrong?
🤗"I don't know... Must be a bug in the OS or framework for sure" -
Lets create a library.
Lets use that library in a project.
Lets wrap the library call in a wrapper functione to remove duplicate code.
Lets add an overloaded wrapper call that wraps the wrapper call that calls the library to partially undo the duplicate code removal.
Lets add another overloaded wrapper call that wraps the wrapper call that wraps the wrapper call that calls the library to partially undo the duplicate code removal.
How I love it. Not.
Sometimes redundancy makes sense, especially when it are two lines which make it obvious whats going on vs a single line that leads to a fuckton of overloaded wrapper functions.
Sheeesh.
Today in "code monkeys deserve divine punishment".
Another funny thing is creating a Helper class for Junit 5 tests, making it instantiable and adding to it all kinds of shit like testcontainer creation, applications instantiation, mocks, ....
... Then " crying " why the tests are so slow.
Yeah. Logic. Isolation of concerns, each test should be a stand alone complex.
But that would lead to redundancy... Oh no.
Better to create a global state god object.
Some devs... Really amaze me, especially when they argument in ways that makes one really wonder whether they are serious or just brain dead.14 -
Okay this is it; FUCK java on android. You need so many fucking workarounds, its insane. Im tryna merge to bmps together, one on top, and the helper class is at 400 lines already and its only kinda working. If you gonna abstract things away, then fucking abstract them well (ocaml) or not at all (c).16
-
Working with this dev who loaded bootstrap, then went on and defined his own class for every freaking helper class in bootstrap..9
-
We live in a world where WEAKNESS has become a virtue.
- I'm oppressed!
- My mental health!
- I need a helper!
- I'm sensitive!
- You're fatphobic!
- <INSERT SJW's IDENTITY term>
In today's world, you score more social points for describing yourself as weak & blaming 'oppressors' for your miserable life12 -
I love Test-Driven Development!
And because of that fact, my heart shatters into thousands of pieces, when I recognize error events on our production nodes which are pointing onto a golden hammer function in a legacy project.
This particular function has about 300 lines with a bunch of subfunction calls and instantiations of helper-classes returning information for workflow.
Refactoring this code to apply proper unit-tests requires a way bigger investment than simply deal with 30 eventlogs a day, because this kind of payment is barely used by customers of our webshop.
This fact is a little itch each day of my work.
Guess it will make me go insane one day
¯\_(ツ)_/¯
xD1 -
Managed to reduce a file from 1155 to 288 lines just by converting the 50 or so methods all calling the same API library with similar setups to use one line helper functions.2
-
Wanna hear a story? The consultancy firm I work for has been hired to work on a WPF project for a big Fashion Industry giant.
We are talking of their most important project yet, the ones the "buyers" use to order them their products globally, for each of the retail stores this Fashion giant has around the world. Do you want to know what I found? Wel, come my sweet summer child.
DB: not even a single foreign key. Impossibile to understand without any priopr working experience on the application. Six "quantity" tables to keep aligned with values that will dictate the quantities to be sent to production (we are talking SKUs here: shoes, bags..)
BE: autogenerated controllers using T4 templates. Inputs directly serialized in headers. Async logging (i.e. await Logger.Error(ex)). Entities returned as response to the front end, no DTOs whatsoever.
WPF: riddled with code behind and third party components (dev express) and Business Logic that should belong to the Business Layer. No real api client, just a highly customized "Rest Helper". No error reporting or dealing with exceptions. Multiple endpoints call to get data that would be combined into one single model which happens to be the one needed by the UI. No save function: a timer checks the components for changes and autosaves them every x seconds. Saving for the most critical part occurring when switching cells or rows, often resulting in race conditions at DB level.
What do you think of this piece of shit?6 -
Slowly getting better with RegEx problems! Warning, lots of non-computer linguistic geekiness ahead.
Been working on some functions recently to replicate the furigana (Chinese character annotation) functions available over at JP.SE in PHP for a project.
Managed to get the basic cases down fairly quick:
[Chinese character][reading] => <ruby><rb>Chinese Character</rb><rt>Reading</rt></ruby>
However I realized this evening that there are patterns where this repeats twice for one word, such as the following:
[Chinese Character][helper Japanese character(s)][Chinese Character][possibly optional word ending][reading for the whole thing]
Managed to get it working for both cases initially, but then I found out that adding a Japanese character to either of my test strings (see graphic) would cause the annotations to fall grossly out of sync. The next two hours disappeared pretty fast before discovering that the issue was that I was removing the wrong string length from the annotation string, and just happened to luck out with a test case where it worked the first time.
Probably going to do a code review of it with the intern next time he's in. One of the things I've been stressing to him lately is that however easy a task may be for a human, there are all kinds of extra things that need to be tracked in order for a computer to be able to follow your logic.7 -
Lessons I've learnt so far on programming
-- Your best written code today can be your worst tomorrow (Focus more on optimisation than style).
-- Having zero knowledge of a language then watching video tutorials is like purchasing an arsenal before knowing what a gun is (Read the docs instead).
-- It's works on my machine! Yes, because you built on Lenovo G-force but never considered the testers running on Intel Pentium 0.001 (Always consider low end devices).
-- "Programming" is you telling a story and without adding "comments" you just wrote a whole novel having no punctuation marks (Always add comments, you will thank yourself later for it I promise).
-- In programming there is nothing like "done"! You only have "in progress" or "abandoned" (Deploy progressively).
-- If at this point you still don't know how to make an asynchronous call in your favourite language, then you are still a rookie! take that from me. (Asynchronous operation is a key feature in programming that every coder should know).
-- If it's more than two conditions use "Switch... case" else stick with "If... else" (Readability should never be under-rated).
-- Code editors can MAKE YOU and BREAK YOU. They have great impact on your coding style and delivery time (Choose editors wisely).
-- Always resist the temptation of writing the whole project from scratch unless needs be (Favor patching to re-creation).
-- Helper methods reduces code redundancy by a large chunk (Always have a class in your project with helper methods).
-- There is something called git (Always make backups).
-- If you don't feel the soothing joy that comes in fixing a bug then "programming" is a no-no (Coding is fun only when it works).
-- Get angry with the bugs not the testers they're only noble messengers (Bugs are your true enemy).
-- You would learn more than a lot reading the codes of others and I mean a lot! (Code review promotes optimisation and let's you know when you are writing macaroni).
-- If you can do it without a framework you have yourself a big fat plus (Frameworks make you entirely dependent).
-- Treat your code like your pet, stop taking care of it and it dies! (Codes are fragile and needs regular updates to stay relevant).
Programming is nothing but fun and I've learnt that a long time ago.6 -
Maybe in special dedication to @kiki.
I cut the unit tests down in LOC size by roughly 50 - 60 % in most projects.
It's really easy once one sees unit tests not as a dunking pile of copy pasta wild west, but rather as a code base that needs architecture and design.
Some extensions, some annotations, some good old helper classes.
Pooooof.
Why I did this? ...
Because it's fucking annoying when you read a PR with tests and need a fucking diff tool to spot the difference between two tests cause they're 80 % the same.
Yeah. Thx for giving me brain cramps, motherducker.
I'm not an expert in unit tests, but if all test codebases look like the "usual stuff" in our projects...
It's no wonder bugs exist...10 -
This is a student helper app I coded and designed for our university that is written in Dart and flutter. For now it supports fetching the course schedule for a given student and the cafeteria menu. What do you guys think of the UI? Any recommendations for improvement or tips for working with flutter in general?26
-
How do you deal with someone like this?
I've got this dev at my workplace that is terrible to work with, he's 2 main reasons why I say this:
1. He has no clue about team work, every piece of code he writes is written as if he is the only person that has to ever touch that
2. He's overtly protective and opinionated on things that make no sense, they're non standard "rules" that he sets and enforces by replacing others code with his own (often times you see quite large PRs and after inspection you realize he rewrote parts of code to follow his style). These "rules" also take up a really long time to follow and would make any actually experienced developer question this guy's knowledge, one example of this is where he repeats the same code over multiple components for "encapsulation reasons" and God forbid you create a global helper of some sort, he'll straight up remove it the next chance he gets. Another example is that all his components or utilities live inside 1 base directory, so you have roughly 300+ components in a /components directory, all with non standard names so you can't tell which is related to which.
I hate working with this person, it's annoying and it also sucks because he's sort of a more "senior" Dev so managers take his side most of the time.3 -
My last successful project was a small project I did together with my gf in javascript. She needed to make some algorithms for school for transfering
freight containers and picking them up. I made some visuals and buttons for her to press. And she added a file with algorithms based on the helper functions I created. such as: GetFirstEmptyPosition() or PlaceContainerAt(x, y)
She learned a bit of programming. And I learned a bit of javascript.5 -
Any Stardew Valley fans?
I've made a little something.
https://nitwhiz.xyz/projects/...
I know there are some bugs (such as the Chef's bundle missing completely), going to fix 'em soon.4 -
HTTPS requests in most languages:
Import a couple of libraries, you may need to install a few as well. It's possible that you will need to initialize and set up the socket. Be sure to specify SSL settings. Create the connection, provide it a URL, and attempt the connection. Read the response, usually in chunks. You may need to manually create a buffer of fixed size, depending on if the language has buffer helper classes or not. You will probably need to convert the input stream response to a string to do anything with it. Close the connection and clean up any buffers used.
HTTPS requests in Python:
import urllib
urllib.YEET()6 -
My new helper arrived. Note! Check your packing material for the santa hat! I almost threw mine away thinking it was forgotten.
Thanks guys!4 -
A frontend dev asked for my assistance in writing a tricky helper function, told him i'd be back in 5, as I was just heading out the door for a cup of coffee.
Came back a little later, maybe 10 minutes instead of 5, and he says:
"Nevermind, I solved it by installing plugin XYZ v4"
Checked out the codebase for said plugin afterwards, and discovers it's around ~30MB of code, and adds a shit ton of "premium version" ads to the backend.
YOU FUCKING TWATFACE! YOUR LAZY FUCKTRUMPET ASS COULDN'T WAIT 5 MORE MINUTES?!!
I NOW HAVE THE MISFORTUNE OF REWRITING YOUR ABYSMAL DISASTER, OR DEAL WITH THIS PIECE OF SHITWARE..4 -
*senior dev comes over to my desk*
"Your code is so wrong I didn't even bother to comment on the review." He proceeds to lecture me about why the code that I modified (a 2 year old file I included a tiny helper module in) needs to be rewritten. -
Fuck my country's universities, fucking greedy assholes that ruin lives, suck wallets and sucks life from the young.
I'm currently studying something completely non related to programming: History. And I really love it. I love reading 1000 pages for each test and essay and talking about the problem of naming the Cold War a war and cold and etc. The problem is that I won't make as much money as I would make even as a self taught developer.
After considering my possibilities, I thought I could enter the computer science carreer. I don't know how this works in other countries but here you would have to study 3 years of an engineering common plan and then specialise in some sort of industrial engineering while getting an specialisation also in computer science. After some counting, I got to the conclusion that I would be studying 6 years (or more), and wasting half of those years learning stuff that I would never use nor care about.
But that's not all. This semester I took the introductory class for programming. It's pretty basic stuff but at least they teach a little bit about algorithms and problem solving. It turns out that a friend of mine that's about to graduate from computer science applied as a helper for the prof. I was so excited I could finally talk with someone about code!
Since the start of the semester I have been passing a lot of time with him and talking about the future. Turns out he doesn't understand shit about code but somehow he learns everything by hard and has passed every computer science course without having any practical abilities. I don't blame him, he's studying hard and playing by the rules, and turns out that he has wasted precious time of his life also learning biology, chemistry, structural engineering, hidraulic engineering, transportation engineering and a ton of engineerings that he won't use.
If the university would instead take that time to teach better courses of practical programming or leave him some time to try out the stuff he learns by hard, he wouldn't have to hear me talking about stuff he doesn't comprehend but feels that should, and wouldn't be utterly depressed, he wouldn't take SIX years to learn less than what he could learn in less than THREE years. And this isn't just a random university, it is one of the 2 best universities we have here and was in 2014 the best of all Latin America.
And wait, here comes the best part. In my country, levels of education are heavily stratified. After school, superior studies give different titles according to the time you've been studying. Yes just the time. And these titles are what your employers will see to give you different work positions. So for studying a 2 year carreer you get a technic job which pays well but not too well, then at 4 years you get a license title which only proves that you know stuff, then at 5 or more (depending on what you are studying) you get a professional degree and will get payed as a full fledged professional. So here, even though in other countries it takes 6 years to have a masters in engineering, they give you just the engineering degree, and it would take 2 (or more) more years to have a master. Even though you can totally teach engineering in 4 years, here they take BY LAW 2 years more, while paying what a fucking full stack of pairs of kidneys would cost in the black market.
So fuck that shit, I won't be throwing my money at any university. I hope they get reformed soon becouse this is fucking dumb, really really dumb. Like 2 year old shit dumb. I'll just learn a bit more, make some projects until I have a decent portfolio and apply to some company that cares for real knowledge and not just a piece of paper with letters and a shitty logo on it.undefined student job revolución fuck university shitty universities student life education im just a bit pissed11 -
During Summer school (yeah I'm an idiot) I disabled this LanSchool Helper thing with a few lines of powershell script(fuck windows, havent used it since I was like 15) that allowed the teacher to see what the students were doing on their computers. Instead of finishing my failing courses I was then able to spend the rest of my time that Summer honing my programming skills.
I graduated a year late, but had easily become the best programmer that school district had ever seen 😎 And by impressing the kids sitting next to me while I browsed docs, blogs, stack overflow, and youtube - rose to be a Summer school legend.
I am a dev badass. I am legend. 😂11 -
In my recent project which passed on to us from other. Its a magento parallel wordpress system. Inside a magento helper file they loaded wordpress wp-load.php. Inside wordpress they loaded magento. I have seen recursive functions; this is the first time i see recursive cms.1
-
More adventures in fixing specs.
This particular failing spec is in an included spec helper; I cannot run the spec itself because rubymine is stupid and doesn't know how. Not kidding. I also don't know the codepath it's actually testing because it's fucking convoluted, so I need (rather: want) a debugger to progress. I put breakpoints everywhere I thought it could be, and... nothing.
The stacktrace shows the calling spec in the helper module, a generic `process` method that just calls `super` (from where? who knows!), and a `wrap_every_action` in the ApplicationController. in other words: absolutely nothing helpful. I stepped through the code for most of an hour and didn't get anywhere; just saw lots of rails internals.
ugh,
I'm going to keep bashing my head against this, but what the fuck, why can't you give me something goddamn useful!?4 -
In a helper for a testing environment there was a flag called CheckLayoutConf. The documentation stated: if set checks if the layout configuration is valid and fixes it. I was curious about the validation and fixing mechanisms, so I looked into the code. But if the flag is set, then the layout configuration is just deleted, so in the next start of the program a new default layout configuration is created. Nice "validation" and "fixing" you for there, I thought to myself.
-
I get in to the office today, and I'm informed that my ceramic origami swan (https://devrant.com/rants/1231342/...) fell and broke during office cleaning.
I'm now afraid to bring new stuff into the office for my desk2 -
"The MVC framework is just a hype, we dont need to refactor our ASP.NET webshop" - former CTO
Dudeee, its a pattern not a framework, ever heard of 'single responsibily' instead of these monolithic 8000 line helper classes!3 -
Complete disaster. As a C++ dev I was assigned to maintain some Python applications (some of them acting as proxies, wtf) just because the original authors left the team. It's slow as hell and it's not even a product - it's a helper tool. Cannot rewrite because nobody will give a green light for that. Why? Why?!4
-
One of my collegues:(C#)
A(him): i need to do a helper to transform 2 fields from a class that are DateTimeOffset to another offset. I want to create a new class that do that and to instantiate where i need it.
B(me): use extensions, they are nicer and they fit better in this case. Also if you want to use a helper just make a static function.
A: it's too complicated
B: Why?
A: Nevermind..
FUCK OFF!1 -
Projects I left behind...
- Voice assistant for people with movement problems (also to send text /make calls while driving)
- client database for my community club (they are using a excel file till I finish)
- CNC helper... The only one I'm developing, with tables and sheet cheats for my work (and any other cnc machine worker), there isn't anything like that in the playstore
- Get a girlfriend
- make a baby -
In several occasions I run rm -rf * in the wrong folder (or wrong server!!).
No big deal so far, but I had to spent more time to redo my work since Linux has no fucking recycle bin like Win!
So I created this helper function to give my brain a few seconds to think before my finger hit Enter.
delete_all_files()
{
echo "WARNING:Delete all files? Type fluffycat to proceed"
read x
if [ "$x" = "fluffycat" ]
then
echo "Deleting all files..."
rm -rf *
fi
}
alias myrm=delete_all_files
Hehehe... I am a genius 😎18 -
ECMAScript is everywhere, so I thought: Let's do even more inappropriate and insane things with it ;)
...Like using Duktape (small ECMAScript engine) and exposing LoadLibrary/GetProcAddress along with some helper routines to describe the routine's argument types and return type, and finally providing a routine to invoke those routines.
It's a very rough prototype that can handle up to 4 arguments in a 64-bit Windows environment.
Next "todo" is structure handling which will initially be a case of stuffing data into a Buffer() object.
I'm not sure what exactly I'm trying to do with it or why...1 -
Let's go back to the roots... don't need any frameworks... go pure JS and have control...
15 minutes later... let's build an helper class to manage arrays....
😐😐1 -
Twilio's API docs suck.
Why can't they just provide a simple API reference will all the endpoints and parameters instead of some hand-holding tutorial with a helper library.11 -
Does anyone else think some of the Sonar rules are actually crap?
In particular the Put all you variables above methods one?
I have some static methods and variables and some object ones.
Apart from creating a new class for them which I think is over kill for just a few helper methods, don't you feel you should keep all static stuff separate?
Clean code shouldn't be about following arbitrary debatable rules, it should be preventing the horrible crap that any experienced developer would instantly call shit... If he didn't write it.
And I'm pretty sure I'm experienced so if I'm not calling a price of code shit...I don't see why Sonar should...1 -
My drunk grandpa decided to cook fried eggs by just throwing them as-is on an electric burner. They started to explode, smoke filled the small room with no windows. I took my younger sister and we ran away, but the smoke made her turn into a red cat.
Meanwhile, my actual cat slipped into a cavern of quicksand. My cat sister stumbled and started to slide into it too, but I was able to save her. Now she’s crying.
A rabid raccoon attacked me. He has a voice of Nick Wilde from Zootopia, and dirty needles for his teeth. I hold it by his neck, my older sister appears out of nowhere. I don’t know what to do to make the raccoon go away.
For context, she has confirmed IQ of around 140 in the real world. She tells me that the most efficient way to do that is to remove its eyes. Raccoon disagrees. She tells me she’s about to patent a device that removes rabid animals’ eyes easily with no hassle. She then proceeds to pull out a crudely fashioned rusty thing which is just an altered door hinge and proceeds to pop out raccoon’s eyes. She throws them away. Raccoon gets calm and wanders off, stumbling into everything.
I go back to my trailer. I try to park it into a better spot, but it falls on its side. As I escape it, a living rubber helper bolus, a good sibling of the felonious bolus from a PilotResSun’s video, is already there. He tells me it’s a rapist-only zone, and I should be careful.
https://youtube.com/watch/...3 -
Dear Devs,
after a bunch of years of exp I thought I would start to write a blog / write articles about dev-things. Small helper articles we all know :)
So 2 questions:
1) What is a good way to start it? Can anyone write for Medium.com? Or make your own website? Wordpress (never used wordpress before btw).
2) I think my english is too bad or a professional article about development - so I would write them in my native language (German) and want to have them translated by a native speaker. Where to find such people without paying a hugh amount each article?8 -
So you're working on a product that basically the main thing it does is fire off http requests and parse their responses into a nice model. We've made some nice helper class that allows you to do this easily, but a simple piece of functionality is not in there yet.
You agree to add this one simple function and decide to:
- Not conform to coding standards set by the team
- Document its behavior which does NOT match the implementation
- Not write a single fucking unit test to prove it's functionality
ARE
...
YOU
...
FUCKING
...
MAD?! -
Working with Yelp API.
Had a working method to return Restaurant List in a separate project.
Moved that code to a new project.
Spent 3 hours trying to figure out why the tried and true method was returning an empty list.
I forgot I had also made a helper method in that other project to turn km into meters.
Instead of searching a 5km radius, I was searching a 5 meter radius...
(Prior to that I mixed up my longitude and latitude, and searched for pizza places in the antarctic. Spoiler: There are none.) -
Actually I have two stories
The first one, that one project I talked about with a big company when I was at school. It wasn't that much coding since it was mostly researching, but it was a big project that seems really interesting, with Image Analysis and Machine Learning.
The projects at school this year got drawn randomly for each group, so when I've been announced that I've been chosen for the biggest project, thinking about every side of the project, I was hyped. And even a year after we finished it, I'm still happy and excited about it.
The second is something a little more funny :
So we got some projects to do during December for school including cryptography. Again, those were randomly drawn (but some can really fuck you up) and I got to do a Password Manager, like KeyPass. We were 4, and we thought we had the time to do it.
But we misread the date. At the end of Christmas break, I got a call of a friend saying that the project is due in two days.
Thing is, one of my three co-workers weren't contactable. And we got nothing.
So I kinda took the lead : I said to one to do the UI, another to do the cryptograph helper, and I'll do the linking and all the behaviour of it.
In two days, I literally spent all the time available on it.
Then first meeting with the teacher for saying what is wrong, where bugs are if they exist, ect. so we can fix the issues and deliver a clean code. They were like only 4 big problems. More is, I fixed them all in like two hours while thinking fixing only one. And we got something like the 2nd or the 3rd best mark of the prom. And everyone congratulated me for that. I got so excited I was able to do that in few time.
But never that again lmao -
While attempting to quit smoking and after spending a full day trying to understand why the previous devs took this approach to encrypting a string and my lack of nicotine addled brain not allowing me to see that this was a “Secure”String and so uses a machine specific key (that’s why the code that worked locally wouldn’t run on production 😑) this is my rant on comments added to the helper I had to write
/// <summary>
/// If you are using this class and it's not for backward compatibility - then you probably shouldn't be using it
/// Nothing good comes from "Secure" strings
/// Further to this Secure strings are only "useful" for single user crypto as the encryption uses the login creds, transferring
/// this data to another client will result in them never being able to decrypt it
///
/// Windows uses the user's login password to generate a master key.
/// This master key is protected using the user's password and then stored along with the user's profile.
/// This master key then gets used to derive a number of other keys and it's these other keys that are used to protect the data.
///
/// This is also a broken crypto method via injection (see Hawkeye http://hawkeye.codeplex.com/) plus the string is stored in plain
/// text in memory, along with numerous other reasons not to use it.
/// </summary>
public class SecureStringHelper
{3 -
How can I find small open source c++ projects to contribute? Yes, i googled this but all I can find was projects with hundred files. Anyone need a lazy helper for his/her os project?4
-
5 hours work to change a simple library to use it in uwp.
Lib was in .net standard so WHY should I change it?
(It is a rename helper that automatically and manually set subtitle name to tv show episode name) -
The time that I felt most like a Dev badass was when I had introduced an E2E test framework and added a bunch of helper classes to it so that our QA team could pick it up and write automated tests for the manual tests they had been doing for years.
Sure, the whole department got laid off after that because we had gotten a new CTO and all of my work was essentially for naught, but it made a lot of people enjoy showing up to work for the first time in a long time, and that was what mattered most to me -
Newtonsoft JSON
https://nuget.org/packages/...
CSV Helper
https://nuget.org/packages/...
With ETL these two cover 90% of file ingest. I’m still looking for a good XML “auto class” package.2 -
A colleague changes the location of a test helper file imported in a bunch of tests. Doesn’t bother to check where that file is imported (except where he’s specifically using it himself).
As a result good dozen tests fail later on. The culprit doesn’t realize. And the rest of us have no clue why.
Multiple people are asked to look into why the tests are failing.
"Ok, who’s working on what?
We’ll create a shared document to track who’s working on what test."
Document is created, people get assigned.
"Hold on, looks like it’s just a faulty import." "Oh yeah same here." "Yeah for me as well."
"Ok we could simply appoint one person to fix all the imports."
"Well I’ve already gone ahead and opened a pull request to fix the test I was appointed to."
"Ah ok, well who can take care of the rest?"
"Wait I also opened a PR."
"Ok so I guess we can each open a PR?" "No we can just have a single branch we can all push to".
"Sure, who’s branch are we using"
"You can use the branch of my PR"
"Guys let me handle this, it’s ridiculous for us to all be doing this separately."
"You’re right, go ahead".
——
The culprit? A senior dev.
What would have literally taken a minute to do (or even no time at all with proper use of the IDE) turned into hours of wasted time. People getting interrupted, having to drop what they were doing to fix the consequences of this guy’s laziness (seriously don’t know what else to call it).
Ok maybe our reaction could have been more efficient, but we never should’ve even gotten to that point in the first place.2 -
The Rise and Fall of Helper Classes
New method doesn't seem to fit into one of the existing classes so a developer creates a new class and innocently called it "helper".
Another dev had a similar conundrum and adds a couple more methods to the "helper" class.
And a few more methods added...
A couple more methods surely wouldn't be too bad. It has unit tests anyway.
After a year, the helper class has now grown to about 10,000 lines that no one is brave enough to refactor.
CTO now says, "Ok let's park this project and build a new one in Go." Fun times!2 -
>start new job, not very professionally experienced dev
>spend couple of months working on a feature that is supposed to be an MVP kind of thing, be rushed to finish and told to cut corners because it's "just an MVP", still lose sleep and have relationship suffer (and ultimately ruined) as I try to not lose deadlines created by the boss with questions like "you can have this done by <very soon>, right?"
>frontend created by fellow developer is a garbled mess of repeated code and questionably implemented subpages, frontend dev apparently copies CSS from Figma and pastes it into new non-reusable React components as envisioned by designer, I am tasked with making sense of the mess and adding in API consumption, when questioning boss what to do with the mess I am often told to discard stuff that the frontend dev has made and just reuse his styling; all of this on top of implementing the backend feature that a previous developer wasn't able to do
>specs change along the way, I had been using a library as a helper in some part of the original feature, now the boss sees that and (without further testing the library) promises CEO that we'll add that as a separate subfeature, but the performance of the library is garbage for larger inputs and causes problems, is basically shit that might not have been shit if we had implemented it ourselves, however at this point CEO has promised new feature to some customers, all the actual sense of responsibility falls upon my hands
>marketing folk see halfway done application and ask for more changes
>everything is rushed to launch, plenty of things aren't implemented or are done halfway
>while I'm waiting for boss to deploy, I'm called up to company office by CEO, and get new task that is pretty cool and will actually involve assessing various algorithms and experiment with them, rather than just stitching API calls and endpoints together, it involves delving into a whole new field of CS that I never had the opportunity to delve into before
>start working on cool task, doing research, making good progress
>boss finally deploys feature I had been originally implementing
>cut corners of original boring insane feature start showing up, now I have to start fixing them instead of working on cool task, however the cool task also has a deadline which is likely expected to be met
I'm not sure if I'm having it bad or not, is this what a whole career in software development will look like?6 -
Chrome Helper is sucking up 100℅ CPU. Again. Why oh why oh why oh why?
It's 5 o'clock on a Friday... I'm calling it quits. -
So when writing golang code, you can put alias into the imported library
And one of interns in my office include include our company's library called "helper/session", and alias it with 'hSession'
Now all the code which use that library has to look like "hSession.ErrUnexpected", "hSession.NewSession"
Well, i think i've played too much VN and anime, but still i'm having a good laugh when doing the code review -
Meetup.com - it's like, meat - and ketchup, so just make the branding like written in ketchup or like splatters or hamburger helper or something. "Meetup" yeah... I'm hungry! Just make it look like all the other sites and ship it!3
-
Inherited a massive code base today... All JS is still being accessed via global scope... what are modules & modular design even... SOLID and DRY are things that clearly never crossed the devs mind during inception of this beast... and to top it all off all there is a weird BEM / SCSS style going on that somehow manages to confuse the IDE... thus all style helper utilities in the IDE are useless...2
-
I wanted to continue working on my project at my grandparents house, using my laptop.
I've pushed the most recent code, but what I didn't push was the recent commits I made in my helper library...
I was updating and using the library locally and now I have a dependency on ../library name. Great job me3 -
So my code works, but it's not the best way to do because there is a specific object made as a helper to do what I want to do.
Thing is, it is written nowhere. We agreed with my fellow co-workers, it's written nowhere in the developer guide provided to give the best ways to code.
Just
Fucking
Update
Your
Documentation -
Any hardcore vim users out there? In need of help with tabs/panes. I tried some google-fu, but not much help.
I have a kubernetes helper, where I can run a command like :Vikube, and it'll open the result in a new tab. Is there any way I can open the result in a splitpane instead? I've found some ways, but not any good ways :/4 -
TIL the definition of Favela Architecture.
The blue spots are (copied) helper classes and everything is static. -
Using a framework's helper function that relies on unrelated libraries which have multiple irrelevant dependencies to do something you could write in three lines of code.
Because it's cleaner and nicer to look at -
Writing a test helper that handles all the fuckery with DB connections and transactions when the legacy under test uses multiple DB connections is so 👌👌👌👌👌👌👌👌👌👌👌👌👌👌
I can write tests for code that was untestable before 💦💦💦
*nerd-gasms*2 -
Android + servers
Hey guys
So cause I barely have time to code I mounted a server with my old cellphone, so I can advance one of my projects at work (it's a helper with stuff like tables and calculators for work [CNC machine] )
The cell phone is a meizu m2 with android 6 (don't buy one, has lots of stupid bugs)
My problem: android terminates the server and a app I use to copy files from Dropbox to the server folder (only work arround the home rooter)
F king meizu bugs : resets lots of definitions to default, like I give permition to the server app to always be on and it changes back to default when I turn off the screen.
So when I turn of the screen the server goes down
Solutions to keep the server always awake?
Also better solution to change /upload the files without Dropbox as an intermediary
Btw the app that syncs also turns off every fucking time (so no updates till I get home)1 -
So I wanted to make a Commodore 64 game, and I decided to use cc65, since I don’t want to use assembly.
First, I tried to position text, and I tried to use CSI escape codes, but that didn’t work.
I forgot to look at the examples, and then saw a lot of helper functions, which were nice.
Next, I tried to do some timing. sleep can only do seconds, so I wanted to use usleep, but they didn’t port it...
Moral of the story: ~~look at the docs~~ don’t make C64 games -
I hate Pull request system!
Plot twist: I just put it in place in my organization because I see the benefit.
Just spent 4 hours (Note : delay was because git refuses to write to stdout and writes everything in sdterr. And couple other things) developing a helper “powershell” script for “small tasks”. It sits directly in the project and as of 30 mins ago available to all devs.
Let’s say you need to change a typo.
Normal process:
• Create a branch
• Fix problem
• Commit/push
• Create pull request (This one was NOT easy. I’ll explain why if someone is interested)
• Switch back to master to fix second bug
Script does exactly that now. ./CreatePullRequest.ps1 <tmpbranchname> <Comment>. (The target for pull request will be the original branch, not limited to master)
Now I’m trying to find what I missed. Because I missed something, 100% guarantied.14 -
At work thres a legacy "common" DLL, which held a helper function that's incharge of creating Slugs, it takes an MD5 of the current time stamp UTC, removing non-URLable chars, and taking the first N chars that remain then
Ngl I was impressed at first at it, but then I thought, its Uniqueness isnt guaranteed
But then again I thought, the uniqueness can be tested via a call given it's indexed anyway in DB so O(1), and if non-unique, just re-call the function. Even in the worst case scenario the hits won't be that many anyway
I didnt change the code, tho at first I was inclined to given my "it isnt proven-unique" stance but am wondering, if this is a good approach
While coolish, it seems wrong in the back of my mind somehow...1 -
Retrofit + Gson is faster than Volley + my static helper class for parsing JSONArrays -.-
I feel defeated //android4 -
I know what my e-mail address says... but I have to say, the integration of AI with the code completion in Xcode Version 16.2 beta 2 (16C5013f) is so good it is scary. It is like it is reading my mind. I'm getting nervous about getting an MRI "Sir do you have any metal in your skull?" Me: "Oh god, did they implant some shit for Xcode to read my damn mind... this is going to friggin hurt!"
But seriously, I'm not at all a Swift fan but I have to say that with this AI auto complete, it is like having a "yea, this is how you normally would do this, how about we do this here" helper in the Mac.
But since the Xcode windows are all these dumb ass file browsers instead of document windows, I'm going to maintain: Xcode (still) Sucks... but a little less with this shit-hot AI code completion!2 -
Dear JavaScript users,
Do you use ES6 or ES5 syntax for creating a class and adding helper functions? Node can't decypher ES6 so unsure what to do.9 -
Dear C++ / Java developers.
Please do not write Python, or do utilize helper libraries / pythonisms.
Not EVERYTHING has to be done by hand, it's not CS class anymore. Classes are fine too, not everything has to be passed as comma separated string. Python is proper Object-Oriented language, not scripting tool like Bash.4 -
so which job pays for improving an existing thing and not being a tool for your boss's whims? I guess the answer is a house-helper cause devs for sure aren't paid for clearing a shitty codebase.
i recently made a commit because i was do angry at the issue . this was the message "fixing a stupid bug from previous owner". it got squashed but i still felt better lol.
there are a few classes in our codebase that are so infuriating that i want to run a bulldozer on them and build from the ground up. multiple bugs ate caused from them, but we simply ignore because we know that our monkey iq QA won't be able to replicate them and we won't be answerable.
I hate to be in this position. the mgmt won't be giving me time to fix this shit but rather want us to add 2k more features to this Frankensteins monster.
adding to this, I can't get my satisfaction creating some hobby project and solving issues in that coz A) it won't be as massive as my company proj and B I won't be interested in building a dimmy project for a longer time, which does not attract any actual users :/1 -
My folder and and file not exist in the local storage. I made a helper to create a directory in phone storage. But it Works on Samsung J2 but not the rest.
My Helper : https://gist.github.com/johnmelodym...
```
if (FileHelper.saveToFile(readMessage)) {
Toast.makeText(MainActivity.this, "Saved to " + Environment.getExternalStorageDirectory() +
"/Brainwave/"
+ FILE_NAME,
Toast.LENGTH_LONG)
.show();
Log.d(TAG, "Data Saved");
} else {
// something something;
}
```
Am I doing it wrong ?6 -
Arch users: Does anyone use the cower tool? I did a fresh install on my laptop and can't find it on aur's pages anymore. I read into it being 'replaced' by something called auracle? Not sure if anybody is up to speed on that, but at the very least cower's package pages have been removed from aur.
A tool like cower only saves me a little trouble of writing a bash script to update all my aur packages at once, but it was one less thing to do without using an AUR helper (which I've been consistently suggested to stay away from). How do you streamline this process on your machines?2 -
rant.author != this
Christ people. This is just sh*t.
The conflict I get is due to stupid new gcc header file crap. But what
makes me upset is that the crap is for completely bogus reasons.
This is the old code in net/ipv6/ip6_output.c:
mtu -= hlen + sizeof(struct frag_hdr);
and this is the new "improved" code that uses fancy stuff that wants
magical built-in compiler support and has silly wrapper functions for
when it doesn't exist:
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it.
The code could *easily* have been done with just a single and
understandable conditional, and the compiler would actually have
generated better code, and the code would look better and more
understandable. Why is this not
if (mtu < hlen + sizeof(struct frag_hdr) + 8)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);
which is the same number of lines, doesn't use crazy helper functions
that nobody knows what they do, and is much more obvious what it
actually does.
I guarantee that the second more obvious version is easier to read and
understand. Does anybody really want to dispute this?
Really. Give me *one* reason why it was written in that idiotic way
with two different conditionals, and a shiny new nonstandard function
that wants particular compiler support to generate even half-way sane
code, and even then generates worse code? A shiny function that we
have never ever needed anywhere else, and that is just
compiler-masturbation.
And yes, you still could have overflow issues if the whole "hlen +
xyz" expression overflows, but quite frankly, the "overflow_usub()"
code had that too. So if you worry about that, then you damn well
didn't do the right thing to begin with.
So I really see no reason for this kind of complete idiotic crap.
Tell me why. Because I'm not pulling this kind of completely insane
stuff that generates conflicts at rc7 time, and that seems to have
absolutely no reason for being anm idiotic unreadable mess.
The code seems *designed* to use that new "overflow_usub()" code. It
seems to be an excuse to use that function.
And it's a f*cking bad excuse for that braindamage.
I'm sorry, but we don't add idiotic new interfaces like this for
idiotic new code like that.
Yes, yes, if this had stayed inside the network layer I would never
have noticed. But since I *did* notice, I really don't want to pull
this. In fact, I want to make it clear to *everybody* that code like
this is completely unacceptable. Anybody who thinks that code like
this is "safe" and "secure" because it uses fancy overflow detection
functions is so far out to lunch that it's not even funny. All this
kind of crap does is to make the code a unreadable mess with code that
no sane person will ever really understand what it actually does.
Get rid of it. And I don't *ever* want to see that shit again. -
Another day, another struggle with time zones.
How many fucking helper methods do I need to create for dates and time zones? How many components, pipes and services do I need to wrap just so two datetimes line up? Apparently another one today. At this point I'm ready to accept flat earth theory if it means no more time zones. I'm fucking sold on it if so.
It's not even the time zone that's the issue. It's business needing it formatted, but also offset properly, based on your browser locale, but with points that cross into DST observing time zones of a different locale simultaneously. Sometimes those times are the same, sometimes they're different, sometimes they're different but only in winter. And despite a plethora of libraries to help with these calculations, nothing ever seems to just work out of the box. So here's to another layer of abstraction, because time zones (and DST) are bullshit.1 -
TypeScript + Vue3 is such a bullshit combination.
No wonder they dragged Vue3's launch for years. Coz it's garbage.
Out of beta and in supposed-prod, yet half the time the complex objects disappear when passed around. Pinia is bullshit-ia.
Unrelated TS components fuck up and console logs a "Ayye New Error we didn't know existed, here go to Vue Issue Helper and tell us about it so we get to make Vue3 worse than before" ffs. -
does anyone here remember any app like Dash or Zeal on mac?
I ran into one a couple of months ago, but didn't use it right away because I had no apple device then
it has a very simple, dark blue interface, and would look for online rather than offline documents, if I remember correctly2 -
I created a few helper functions in bash sometime ago, maybe someone might find it useful
https://github.com/zombieleet/... -
Having full access to online papers opens up a lot of benefits for students:
Online essays are available whenever you need them. You just need to have access to the Internet!
Our essays are written in accordance with all writing standards. You shouldn’t be worried about grammar mistakes because we add samples of reputable professionals to our base. It also means that structure, sequence, and logic of writing are clear, precise and understandable.
Our website contains an huge assortment of newspapers on topics that are various, which means you will not have trouble locating the one for your requirements.
You may download and use our samples! This benefit is helpful since you may look through our essays and also make up your papers that are private to fulfill both your own teachers' needs and get outstanding grades.
Specialized language can be found by you in our essays, which is quite beneficial to understand while drafting missions that are new. You could paraphrase some passages to make them seem brand new and fresh.
You can even cite some of them because quotations are used widely in our essays. Moreover, you can use references from essays to broaden your base of references. Thus, your essay may look more solid and convincing, and newly found references may help you with further research and writing.
Our site is easily navigated. It has an essay helper that facilitates to find a proper paper manyfold. It will not take much time to find a paper you really need.
Nevertheless, students who are under pressure due to lack of time and control can place an order for custom and professionally written essays. Our trustworthy service has already assisted many times in writing original and qualitative assignments. High standards of our works have helped many students to get the best grades! Your professors will be satisfied, and you will get more time to do things you really adore doing! -
Hello, I am stuck working on a project built on top of CakePHP 1.3 and I have some custom helpers, one of them named Order; for my views, I need to set a variable $order to contain the order data.
My problem is that if I set the variable in the controller ( $this->set(compact('order)); ) it overwrites the helper instance ( $this->Order ), and if I set it with a different name in the controller (say $_order) and reassign it in the view file ( $order = $_order ), the helprr instance ( $this->Order ) is also overwritten...
I really need to have the namings as described in order for my code to be clean and logical.
FML...