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 - "snippet"
-
I absolutely HATE "web developers" who call you in to fix their FooBar'd mess, yet can't stop themselves from dictating what you should and shouldn't do, especially when they have no idea what they're doing.
So I get called in to a job improving the performance of a Magento site (and let's just say I have no love for Magento for a number of reasons) because this "developer" enabled Redis and expected everything to be lightning fast. Maybe he thought "Redis" was the name of a magical sorcerer living in the server. A master conjurer capable of weaving mystical time-altering spells to inexplicably improve the performance. Who knows?
This guy claims he spent "months" trying to figure out why the website couldn't load faster than 7 seconds at best, and his employer is demanding a resolution so he stops losing conversions. I usually try to avoid Magento because of all the headaches that come with it, but I figured "sure, why not?" I mean, he built the website less than a year ago, so how bad can it really be? Well...let's see how fast you all can facepalm:
1.) The website was built brand new on Magento 1.9.2.4...what? I mean, if this were built a few years back, that would be a different story, but building a fresh Magento website in 2017 in 1.x? I asked him why he did that...his answer absolutely floored me: "because PHP 5.5 was the best choice at the time for speed and performance..." What?!
2.) The ONLY optimization done on the website was Redis cache being enabled. No merged CSS/JS, no use of a CDN, no image optimization, no gzip, no expires rules. Just Redis...
3.) Now to say the website was poorly coded was an understatement. This wasn't the worst coding I've seen, but it was far from acceptable. There was no organization whatsoever. Templates and skin assets are being called from across 12 different locations on the server, making tracking down and finding a snippet to fix downright annoying.
But not only that, the home page itself had 83 custom database queries to load the products on the page. He said this was so he could load products from several different categories and custom tables to show on the page. I asked him why he didn't just call a few join queries, and he had no idea what I was talking about.
4.) Almost every image on the website was a .PNG file, 2000x2000 px and lossless. The home page alone was 22MB just from images.
There were several other issues, but those 4 should be enough to paint a good picture. The client wanted this all done in a week for less than $500. We laughed. But we agreed on the price only because of a long relationship and because they have some referrals they got us in the door with. But we told them it would get done on our time, not theirs. So I copied the website to our server as a test bed and got to work.
After numerous hours of bug fixes, recoding queries, disabling Redis and opting for higher innodb cache (more on that later), image optimization, js/css/html combining, render-unblocking and minification, lazyloading images tweaking Magento to work with PHP7, installing OpCache and setting up basic htaccess optimizations, we smash the loading time down to 1.2 seconds total, and most of that time was for external JavaScript plugins deemed "necessary". Time to First Byte went from a staggering 2.2 seconds to about 45ms. Needless to say, we kicked its ass.
So I show their developer the changes and he's stunned. He says he'll tell the hosting provider create a new server set up to migrate the optimized site over and cut over to, because taking the live website down for maintenance for even an hour or two in the middle of the night is "unacceptable".
So trying to be cool about it, I tell him I'd be happy to configure the server to the exact specifications needed. He says "we can't do that". I look at him confused. "What do you mean we 'can't'?" He tells me that even though this is a dedicated server, the provider doesn't allow any access other than a jailed shell account and cPanel access. What?! This is a company averaging 3 million+ per year in revenue. Why don't they have an IT manager overseeing everything? Apparently for them, they're too cheap for that, so they went with a "managed dedicated server", "managed" apparently meaning "you only get to use it like a shared host".
So after countless phone calls arguing with the hosting provider, they agree to make our changes. Then the client's developer starts getting nasty out of nowhere. He says my optimizations are not acceptable because I'm not using Redis cache, and now the client is threatening to walk away without paying us.
So I guess the overall message from this rant is not so much about the situation, but the developer and countless others like him that are clueless, but try to speak from a position of authority.
If we as developers don't stop challenging each other in a measuring contest and learn to let go when we need help, we can get a lot more done and prevent losing clients. </rant>14 -
Not one feature.
All analytics systems in general.
Whether it's implementing some tracking script, or building a custom backend for it.
So called "growth hackers" will hate me for this, but I find the results from analytics tools absolutely useless.
I don't subscribe to this whole "data driven" way of doing things, because when you dig down, the data is almost always wrong.
We removed a table view in favor of a tile overview because the majority seemed to use it. Small detail: The tiles were default (bias!), and the table didn't render well on mobile, but when speaking to users they told us they actually liked the table better — we just had to fix it.
Nokia almost went under because of this. Their analytics tools showed them that people loved solid dependable feature phones and hated the slow as fuck smartphones with bad touchscreens — the reality was that people hated details about smartphones, but loved the concept.
Analytics are biased.
They tell dangerous lies.
Did you really have zero Android/Firefox users, or do those users use blocking extensions?
Did people really like page B, or was A's design better except for the incessant crashing?
If a feature increased signups, did you also look at churn? Did you just create a bait marketing campaign with a sudden peak which scares away loyal customers?
The opinions and feelings of users are not objective and easily classifiable, they're fuzzy and detailed with lots of asterisks.
Invite 10 random people to use your product in exchange for a gift coupon, and film them interacting & commenting on usability.
I promise you, those ten people will provide better data than your JS snippet can drag out of a million users.
This talk is pretty great, go watch it:
https://go.ted.com/CyNo6 -
A new urgent request today…
“ITS URGENT WE NEED THIS CODE IN IMMEDIATELY I DONT CARE IF ITS FRIDAY WE NEED IT THERE BY ONE HOUR”
“What is happening?”
“ADD THIS CODE TO OUR CODE”
(A snippet to track marketing conversions from fb)
“Uhhh it’s Friday and our product won’t release to the public for 2 months anyway?”
“YOU DONT GET HOW URGENT IT IS, MUST BE THERE IN AN HOUR OR WE’LL LOSE DATA”
“O….k”
Spoiler: data said that today we had no customers on an unreleased project. Go figure!5 -
Worst experience with cs profs? Oh boy....
Databases lab: "You'll need to work of this snippet, if your IDE tells you it's deprecated you don't need to care about it"
If you want to imagine the quality of the code base we were expected to work upon just think about that attached xkcd comic, basically an undecipherable black box.
The instructions where at the same time micro managing everything (he gave us frickin variable names to use, and no good ones, no the database connection had to be called datbc, yeah very descriptive) and yet so obfuscated that I'm not completely sure he didn't resurrect Kant himself to ghostwrite for him.
He also didn't like us to use any Java feature that was to 'modern', for example for each loops since "they offer no benefit over normal for loops".
Further, everything we wrote had to be documented with a relationship diagram and a uml. So far no problem if he hadn't invented his own flavor of both (which can be read about in his book).
Oh, and he almost failed me because I used a lambda expression in his 'code on paper' exam and this "arrows are a C command" I "must have been confused"... which is glorious coming from the guy who can't get operators and commands straight.1 -
Ahhhhhhhhhhhhh!!!!!!
A pull request I made to an actual open source project got merged. I might actually be a real dev now!
(It was just to remove a snippet config, but still!)7 -
Books and command lines.
I don't like teachers.
I think it's because my learning process is very async and chaotic. When I see a snippet in Golang, I relate it to PHP, Rust and Haskell. I jump to resolving the problem in other languages, trying to find out which approaches work in Go.
Then I read about some computer science concept on Wikipedia and get lost in that while my hunger for knowledge and food increases. After a while I look up a recipe for a pasta salad, and while cutting bell peppers, I see the recipe in terms of typed morphisms, I sprinkle and intersperse ingredients through mapping functions, then decide to write an interpreter for the esoteric "Chef" language in Go so I can interpret my salad recipe while eating it.
Voila, I'm learning Go.
I have no patience for linear mentoring, and others have no patience for mentoring me.
But that's OK.1 -
@dfox
!rant, it's the Feature request
Possibility to post `a code snippet with monospaced font` would be usefull.
Or even
```
def multiline_code():
from 2 to Inf:
"Lines of code"
```
Sth like in markdown.9 -
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
John F. Woods
(found this in a demo snippet)6 -
Oh my dear DevRant, please add code-formatting standards & check-style validation on submitted code snippets, because the wrong indentations of code snippet posts on DevRant is driving me crazy, check-style ftw!2
-
I just found this code snippet on Stackoverflow that decodes polylines from Google Maps.
I even doubt the genius who wrote it understands what it does.
Anyway,as long as it works am good.4 -
Story Time:
When I first started working where I currently am, the manager at the time decided to send us off to a conference about one of the products our institution was purchasing at the time. She also thought that it would be a good way for me, the new guy, to bond with the rest of the staff.
During the presentations we found out that the people surrounding us were not exactly developers because of a couple of things:
1. Some examples were done with php and javascript for adding functionality to said product. The product gave you the opportunity to script on top of it (think of some sort of CMS, but it does not use PHP as its backend language) EVERYONE from the "class" in this particular workshop said they were developers. But at the sight of php in a group of 80 people or so, only about 7 recognized it, including myself and my team.
2. When they showed an example with Javascript, in particular jquery, one of the dudes in the workshop said (with extreme senior level confidence might I add) "yeah I never liked Javascript because you really can't connect it to any database in a website" <--- my face went 0.o and one of the actual developers doing the presentation did a Jim from the Office and looked at some out of screen camera.
3. During a conf talk, one PHD dude showed an example in the template language the CMS used (an obscure Java based template language)in which he was proudly calling out a technique he used to include one snippet of code into another one.....at that time, one of my coworkers squinted his eyes in disbelief, got close to me and said "is this man telling everyone in here that he discovered how to include a file? like, as a new thing?" me: "lol yes", him: "this is a waste of time, do the docs for this thing show how to do it or is he doing some sort of strange maneuver for something the platform does not support?" me: "let me check....nope, it is included, for some reason he made a function that takes the...name of the file he wants to include and passes it over to that call inside of the body....which as per the docs it is the include function...." him: ".....fuck, what a waste of time and money, fuck it lets spend a couple of more minutes here and then go get a drink or something"
That last part was my favorite really, the man speaking was not just any phd holder, but a comp sci phd holder. To this day my dude would walk into my office and say shit like "I DISCOVERED HOW TO INCLUDE A FILE WITH PHP!"14 -
Share your VS Code installed extensions here.
Mine is: Alignment, Better Comments, change-case, Colonize, CSS Peek, DotENV, File Utils, GitLens (my favorite!), Gulp Snippets, JS-CSS-HTML Formatter, Laravel 5 Snippets, Laravel Blade Snippets, Material Icon Theme, npm Intellisense, Numbered Bookmarks, Path Intellisense, PHP Debug, PHP DocBlocker, PHP Intelephense, PHP IntelliSense, Prettify JSON, Quokka.js, snippet-creator, Vetur.
Feels like there are redundant extensions here that I need to uninstall.
Happy Friday and Cheers! Excited for Infinity War movie! 😎15 -
Oauth2 examples.
Seriously all examples I found use library that use library that use library to just build url encoded parameters like this
client_secret=foo&code=bar
Got me 5 hours to dig going trough couple of github repos with implementation to see that shit at the end.
Seriously people !!!
Start thinking before you write single line.
I don’t want to download 10 dependencies and 100MB+ just to send 2 requests with url encoded parameters.
It’s in every - literally every language.
I know you’re stupid but please just try to understand how things work instead of copy paste another stackoverflow and medium snippet.4 -
Interviewer: can you write a code snippet to explain function overriding
Me: *gives a practical example *
Interviewer: *not satisfied*
Me: what would be a proper example for the question?
Interviewer: *writes a text book example *
Her example didn't even need inheritance in the first place. It's one of those forced examples.
Next question: a riddle. Yes, a riddle4 -
Snippet of an overheard conversation today:
"LOL maths beyond basic arithmetic is so dumb. No-one needs pythagoras, trig, calculus or any of that crap unless they have some unholy desire to find the geometric properties of their sandwich."
"What do you want to do when you leave school then?"
"Something to do with AI. That stuff is really cool."
🤦♂️🤦♂️🤦♂️8 -
That moment when your function runs problem free on the first try.
The feeling of "Holy shit" and "I think I just spent an entire day's worth of luck in this snippet of code"
I don't think I'm gonna go outside today.3 -
Self rant!
Looked at a code snippet I wrote last year and I thought to myself: am I geting stupid for not understanding my own code ?
Tried to re build it from scratch...
Failed and had to reuse it without understanding how it's working.
I guess I am getting stupid!5 -
This snippet was found in Thanos’ bash history:
```
ps Sh | sort -R | awk 'NR % 2 {print $1}' | xargs sudo kill -9
```joke/meme shell script thanosdidnothingwrong avengers joke marvel scripting snaps that hurt in prod thanos bash -
// Snippet
if(isUsingEdgeOrIE(window.navigator.userAgent)){
window.location.assign("https://google.com/chrome/browser/");
}
*sigh*
People laugh at it when you say Internet Explorer is a Pain in the *ss to develop for, because they think it's just a cliché or some sort and think it's not that bad.. but no .. really.. F*ck IE.. :D It f*cked me over so many times..
"Oh Hey, I don't recognize this basic html attribute value you are using, so I'm not going to report an error in the console or so, ima let you search, sweat, get angry, .. Oh Hey, you're not using the right doctype? Let me crash your entire javascript functionality, .. Oh Hey, this CSS selector? I never heard of it.. "8 -
I remember a few months ago at my school we all had taken the Chromebooks (our county's OS of choice) out and put them on our desks. We were in science, and we needed to take screenshots of websites for some reason. "Everyone go to the chrome store," our teacher said, with a look-how-smart-i-am kind of look on her face, "search for the 'Awesome Screenshot Extension.'" Ugh. This was dumb. I reluctantly searched it up and upon bringing up the description and about to press the "Add to Chrome" button, when I stopped, and made a decision I would later regret. Now, I don't really like this teacher, and she thought she was so fucking smart for finding this shit extension. I raised my hand, and she walked over. "Uhh… I'm pretty sure you can just do Ctrl + shift + []|| to take a screenshot" I said. She was fucking dumbfounded. She yelled out "Class, listen up! [Let's call me 'Ben' for this story] Ben just found an alternative [she was trying to make her extension not seem entirely useless, even though she knew it was] way to take a screenshot. Just press Ctrl + shift plus that box with the two lines next to it. You can use my extension or the one Ben found. Whichever is easier [she damn well knew which was easier]." Three times in the span of the next five minutes she said "just a reminder… you can use Ben's way if you want" to the whole class. Everyone kept looking at me. A few minutes later, she called me up to the computer which was being displayed on the big screen in front of class. She said some people were having trouble, so then pulled all the attention on me to come up to the front of class and demonstrate a goddamn keyboard shortcut. She was running windows 8, and I knew it wouldn't work on her computer. I pressed a few random keys on the keyboard and said "uhh, I think it only works on their computers" she let me sit back down. She couldn't handle the concept that different computers run different operating systems. I sat down and the guy sitting next to me raised his hand. He said "you could use the 'snippet tool'" Yes. Some people can. But she can't. I stopped him from doing anymore damage on their small brains by saying "uhh, it won't work on the Chromebooks, so that won't help." I hate that teacher. At lunch my friend came over to me. He has the same science teacher as me. "You know what she's been saying all day?" I was confused. "What?" I said. He almost started to laugh. "All day she's [the teacher] has been telling everyone that you found this amazing new technology in the Chromebooks. [Most of the students were smart enough to know that I didnt] she was like 'Ben, from my 2nd period found this amazing thing'" End of story. And guess what? I still hate her.3
-
Genuine snippet of code from something we are rewriting from scratch..
// Returns true if section length is greater than maximum path
public bool isOversized(double sectionLength) {
return false;
}
Fffuuuuuu6 -
Consumers ruined software development and we the developers have little to no chance of changing it.
Recently I read a great blog post by someone called Nikita, the blog post talks mostly about the lack of efficiency and waste of resources modern software has and even tho I agree with the sentiment I don't agree with some things.
First of all the way the author compares software engineering to mechanical, civil and aeroespacial engineering is flawed, why? Because they all directly impact the average consumer more than laggy chrome.
Do you know why car engines have reached such high efficiency numbers? Gas prices keep increasing, why is building a skyscraper better, cheaper and safer than before? Consumers want cheaper and safer buildings, why are airplanes so carefully engineered? Consumers want safer and cheaper flights.
Wanna know what the average software consumer wants? Shiny "beautiful" software that is either dirt ship or free and does what it needs to. The difference between our end product is that average consumers DON'T see the end product, they just experience the light, intuitive experience we are demanded to provide! It's not for nothing that the stereotype of "wizard" still exists, for the average folk magic and electricity makes their devices function and we are to blame, we did our jobs TOO well!
Don't get me wrong, I am about to become a software engineer and efficient, elegant, quality code is the second best eye candy next to a 21yo LA model. BUT dirt cheap software doesn't mean quality software, software developed in a hurry is not quality software and that's what douchebag bosses and consumers demand! They want it cheap, they want it shiny and they wanted it yesterday!
Just look at where the actual effort is going, devs focus on delivering half baked solutions on time just to "harden" the software later and I don't blame them, complete, quality, efficient solutions take time and effort and that costs money, money companies and users don't want to invest most of the time. Who gets to worry about efficiency and ms speed gains? Big ass companies where every second counts because it directly affects their bottom line.
People don't give a shit and it sucks but they forfeit the right to complain the moment they start screaming about the buttons not glaring when hovered upon rather than the 60sec bootup, actual efforts to make quality software are made on people's own time or time critical projects.
You put up a nice example with the python tweet snippet, you have a python script that runs everyday and takes 1.6 seconds, what if I told you I'll pay you 50 cents for you to translate it to Rust and it takes you 6 hours or better what if you do it for free?
The answer to that sort of questions is given every day when "enganeers" across the lake claim to make you an Uber app for 100 bucks in 5 days, people just don't care, we do and that's why developers often end up with the fancy stuff and creating startups from the ground up, they put in the effort and they are compensated for it.
I agree things will get better, things are getting better and we are working to make programs and systems more efficient (specially in the Open Source community or high end Tech companies) but unless consumers and university teachers change their mindset not much can be done about the regular folk.
For now my mother doesn't care if her Android phone takes too much time to turn on as long as it runs Candy Crush just fine. On my part I'll keep programming the best I can, optimizing the best I can for my own projects and others because that's just how I roll, but if I'm hungry I won't hesitate to give you the performance you pay for.
Source:
http://tonsky.me/blog/...13 -
Python is such an amazing programming language. Look how easy it is to write business-logic for the production world. This snippet is used at YouTube HQ to process how the users think about the ads that are displayed every now and then, while the user is listening to music1
-
Saw a funny code-snippet on a notebook in front of me and noticed the name devrant. Checked, immediately registered, already having a blast!7
-
Proof that there is no drug testing at Apple:
- Xcode 10 moved code snippets in a transient spotlight-style window.
The only way you can show snippets is if you have your editor window in "browser mode" vs "document mode" and then the dumbass button with { } on it shows.
If you go into the help menu in the menubar where you can search the other menus, typing in "Snippet" shows only "Create Code Snippet" under "Editor" menu.
So to make it painfully clear, they hide the snippets under a button on a window in a particular window mode. Then, because they have now fucked up the use of Snippets, the "Create" capability becomes a "how do we do that?". This did not make them reconsider their approach... oh nooo... instead they sloppily stuff it in the regular menus all by itself... and do not put a Show Snippets near it. And conversely they don't put a "+" or "-" button in the snippets window.
So here is what happened... someone said "having the snippets in the code editor window is a pain" and someone half-listening heard "windowpane" and pulled out their stash of LSD... everyone took a hit ... and now we have a fucked up hidden button and an orphaned menu command.
I'm going to have to change my username to "XcodeDevTeamAreMorons"3 -
Everyone is on their vacation and I am in good mood so time to refactor some 3 year old frontend, angular, javascript code. After 5 minutes of looking, some great quality of code snippet on the image below.10
-
The most important skill you can have is doing things without shame.
Shamelessly stay in your bed all weekends watching PewDiePie, never brushing your teeth, eating Doritos from under your pillow and peeing into empty Mountain Dew bottle if you feel like doing it.
Shamelessly spend your vacation sitting in the toilet with a laptop browsing reddit.
Shamelessly cut your product in half and ship it if you don't feel like perfecting it.
Shamelessly admit that you don't know something when you messed something up at work.
If you are a millennial like me, chances are your gen x parents told you that you have to be perfect / really good to succeed and to be worthy.
You know what? Fuck your parents then. Fuck my parents as well. Admitting this behavior wrong and actually giving up on living like something is always watching is the best thing you can do to your mental health.
I'm lazy. I write "any" here and there when they force me to do typescript at work. When I need a sidebar, I go and copy-paste that jquery snippet. I write like one article a month at best and I really want to say "fuck it" if I just don't feel like it.
You can always give up on everything and it's perfectly fine. This doesn't make you any kind of looser or something. You're perfectly fine.
Too bad I'm only beginning to master that.9 -
Trying to explain to your S/O why a particular snippet of code is so fucking sexy and exciting -- then you get the "WTF are you talking about? 😐"5
-
Saw this today in the exercise code of a deep learning lecture. These people are doing their PhDs in deep learning 😳
* the snippet has no side effects14 -
Me in front of an year old code snippet:
1) "omg, wtf did i write that time?"
2) "i'm going to fix it"
3) after 2 hours lost trying to get new code working... reset from git
4) look around feeling guilty -
When will medium and its coding tutorials die out already? Why the hell are every fucking post of this plattform so cringy af, like tf why you start your tutorial with a fucking irrelevant meme you dumb asshole? Your code snippet is mostly garbage and you aint explain shit; I am not even sure if the code is yours. Go eat a dick and learn the subject properly before even start to teach people online.6
-
At this point, I just feel bad for my coworker.
No, I am not frustrated or angry, just feeling terribly bad for her as how difficult life must be for someone so dumb.
We are introducing a new method to track some data in our product, like total number of sign-ups, DAU, etc.
Now the implementation is already WIP and this is known to all.
The dev has documented the approach where he has mapped the screen name, a screenshot, and a snippet of the schema that tracks that particular screen.
I kid you not guys, this coworker somehow landed on that document and started some scientific study to try and extract data.
Yes, she looked at the schema screenshot and spent like few hours trying to decode it to figure out the sign-ups and DAU.
Data via a screenshot in a document. I can't even express it.
And then texts me in panic mode that she isn't able to access the data because the file is . jpeg within a document.
I asked where is she executing the schema, because I thought she is joking initially. She said she doesn't know and asked me where she should execute it.
My mind is numb. Life must be real hard when you are so fucking dumb.19 -
I can't be the only one who zooms into random pictures on the internet containing a monitor(with an IDE open) in the background to see what language they're using and whether it's a legit snippet of code.5
-
Quick backstory. I've negotiated with our customers to drop IE11 support (happiest day of my life) and decided to also refactor and update our webpack configuration. I asked a bunch of questions about a few exclusions we had for JS processing and received a reply of: I don't know if we need these anymore. Queue a snippet of my response in a meme format on how I wish to proceed with the change done by our tech lead.
-
Rant on anti devs.
I helped my friend crack a fairly simple hackerank. The questionnaire was basic JavaScript questions and little on CSS selectors nth child. The test is finished in half hour instead of 75 mins.
5 months later. He calls again and ask if he can get the question solutions (code snippets). I didn't have those but curious why he needed it. He says he wants to put that solutions to Github. So would look on resume. This is not even a project just code snippet with a for loop. He just wants any codebase to upload to his profile.
My ears are bleeding. It makes me sad that some people had to do Masters in computer science purely out of societal pressure. Just because software development is booming field a lot of folks who are not genuinely interested in development are being forced into the industry.6 -
My Team Lead: Hey do you know goofy?
Me: What is it?
TL: It's a new programming language
Me: *being suspicious* show me what are you dealing with
TL: *Shows me a Groovy code snippet*
Me: Yeah!! Your goofy is pretty good!! Enjoy! 😡1 -
Programming commandment: Thou shall not commit code snippet copied from StackOverflow without adding a comment to help future coder brethren!
-
me vs marketing guy, again
me: yeah, the database server is not responding, so you cannot log in to post your blog, wait for it to get online.
MG: But, the website is online.
me: web host and database server are two distinct things, they are not the same, *share a screenshot of the error*
MG: Oh okay.
Literally 3 hours later this fucking idiot sends an email and I quote.
"Hi Dev,
@CTO FYI, Someone has removed this code So there is some tracking issue on it.
Please add below google analytics code on the website.
Note: Copy and paste this code as the first item into the <HEAD> of every web page that you want to track. If you already have a Global Site Tag on your page, simply add the config line from the snippet below to your existing Global Site Tag.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://googletagmanager.com/gtag/..."></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxx-1');
</script>
"
The fucking issue was of him not being able to post his shitty blog, and he shares an email like this, FOR FUCK'S SAKE!2 -
After noticing 4 operations in a single line, I comment a pr stating the line is not simple to read as there are many operations which can be, especially in the eyes of a junior, hard to read.
I proceed to suggest a better solution.
Colleague: “what??? How is this not readable??? Is it [op1], [op2], [op3] or [op4]? 🤷♂️”
I kindly explain this person that it’s not about the single operations, but the fact they are all on a line. Inside an object assignment.
Colleague: “you should learn stuff! (4 links to websites giving that snippet of code”
Ah yes, the oldie: “but other people are jumping off a cliff, why don’t WE do it???”5 -
A beautiful gem ticket from a manager today:
Title: "Check Stripe "Snippet APK" that might help for integration into the app to track pricing easily."
Alright, it's very clear this particular individual has no idea what they are talking about, but, I'll give them the benefit of the doubt and read the ticket description!
Description: "I think stripe offers some sort of snippet that can be implemented into the app similar to FB pixel. (I could be wrong here..) let’s briefly check this, if it’s of value for our A/B-Tests → e.g. if it makes your life easier = good otherwise it’s not important."
...
I might as well replace the management team with GPT-3 at this point.
Or even just a simple Markov chain; that'd probably be more accurate if you want to match the ticket quality more exactly of this ABSOLUTE PILE OF HORSESHIT WASTE OF TIME I GET FED EVERY SINGLE FUCKING DAY.
🤡4 -
!isNotRant(this);
I'm an avid user of Snapchat and have used it for quite a while, but there's always been something that pisses me off.
When an app gets an update, I'm quick to check the changelog and see what's now and what's been fixed. That's my little snippet of information I like to know on a release. And then there's Snapchat.
They put fuck all in their changelogs. By fuck all I don't mean a little bit of information, I mean they don't list anything. They, instead, lost features from their last major release which could've been 10 or so releases back. Even Twitter's "Fixed some bugs" is more informative than their bs.
So I ended up writing a well worded and surprisingly clean message in their feedback section about this, but I'm not expecting much. In short I said "You changelogs are crap, you need to put more into them to show a bit more respect, showing stuff from a few releases ago isn't helpful" and my favourite "if you can't do it in the team that releases, get the primary devs to write the changelogs for you".
I'm saying this here to see if anyone agrees with my opinion. If you're going to release an update, you really need to tell us what's updated.
Thoughts?13 -
!Rant
Do you guys have a idea how I can call my new snippet manager application? The application allows you to save code and URLs to view Inside of the application. Also the application is highly customizable supporting 42 coding Languages and over 42 Themes. Currently its named: "SNIPR". But i would like a Name thats not directly connected to the application and what it does. Maybe you guys have some ideas? Because im not that creative😀😀👌
This is a example of the main ui using the dark theme26 -
Calling all Devs 🤙:
What's the _best_ worst code you've seen in the wild in your corporate codebases?
Include a snippet of the traumatic lines in your comments!
I'll start with a classic:
$send = $enabled ? true : false;14 -
A client asked me to include a GA tracking code into her website,
I said yea I'll add it for you, just send me the code snippet please :)
she sent me the URL to google analytics login page....
I told her that I need the code snippet not the URL.
She replied: yah that's what I sent.
Me:...2 -
Now this looks stupid already, but here is the kicker: by "partially hydrated cursor" i mean that once every page size an sql query is ran to get the next page content. This code is put in an event handler, executed once every time a file is uploaded in a dms where files get uploaded by the thousand.
To sum things up, this simple snippet achieves triple dipping:
* waste time on useless sql queries
* waste cpu on useless iterations
* waste disk space on useless logs
Icing on the cake, the author of this piece of shit was complaining about the overall slowness of the process.
Needless to say that when I stumbled on this, both internal *and* external screaming ensued...4 -
Afraid of CSS? Here’s a snippet of completely valid stylesheet to ease your anxiety:
.container {
break-before: verso;
display: ruby;
mask-border-slice: 0;
overflow-anchor: none;
touch-action: manipulation;
font-variant: historical-forms;
initial-letter: 3.0 2;
}24 -
drives me crazy when people send log or code snippets in slack and don't create a code snippet and send through as a plain message.2
-
Posted a question on SO and someone thought they could get clever and turn my Feathers + Nuxt snippet into a functional SO code (to preview or whatever). I told him it's not going to work for various reasons, so he deleted his answer and "down voted" my question. Thanks dude... Thanks a lot...
#StackUnderflowed1 -
Wow, great read for anyone that's interested.
https://linkedin.com/pulse/...
For example, this snippet is very true and I guess a lot of use know it. (It's how I became a programmer).1 -
As if StackOverflow wasn't full of trolls already, now I get people complaining I didn't make "Stack Snippet" instead of a jsFiddle etc.. AFTER I've already answered the question. Don't even get me started...3
-
The infuriating edgecases of python copypasta.
If you're like me, and you find it easier to noodle in notepad++ and the console, then you may have encountered this peculiar bug.
Try padding blank spaces on an empty string variable, and follow it with print(blanks + str(var))
#for any variable
Now copypaste that along with at least one other line at the same time.
Observe how no matter what you do, print will always output the blanks variable on a separate line, with quotes.
Try rewriting right-justify? No good.
Try using f-format strings? No good.
Raw strings? Inspecting bytes to see where the newlines and carriage returns are being inserted? Nothing.
Copypaste with multiple strings will *always* insert quotes and a new line when printing *any* variable with a string thats been justified.
And this is 100% non-congruent with pasting the same *line* of code *by itself*, which works as intended, no quotes or additional new lines are inserted.
I just went ahead, turned the snippet into a function, and called it from there, which solved the problem entirely.6 -
Dont get me wrong I like C, but I've never seen so many different ways to do things where I cant even tell whats fucking happening in the snippet of code.12
-
So, today I wanted to program a bit and, after reading the last chapter, I want to see what I able to do.
I run my last Linux distro, I open sublime and I start typing code. I finish, I build. 0 warning, 0 errors. Nice! I execute the code: error.
I watch and I struggle on the code for hours, I search on Google, I search on StackOverflow, but after 1 hour I notice I'm looking for a needle in a haystack. So I search instead for a way to produce a better error. I found it, I'm very happy. Let's try what the error actually is:
Error: success
Ok....
Ok...... Well, maybe.... Uhm......
Ok, I won't give up. I search for a tutorial. Found.
The code is almost the mine, it's actually a usual snippet, nothing new. I compare my code with the code in the example/tutorial.
First line, is the same.
First 10 lines, are the same.
First 30 lines, are the same.
I build and execute the example: it works.
I build and execute my code: still doesn't work.
I won't give up, I said it. I won't give up.
I wonder if there's a tool like git diff, so I can see what the differences are, maybe I've no good eyes.
I search, first Google result, "diff"
diff myCode.c example.c
"the files are not identical"
...thank you
I search for a better command
diff -y myCode.c example.c
"the files are not identical"
I search for a still better command
Found. StackOverflow stroke again.
sdiff myCode.c example.c
"the files are not identical"
.....
....
.....
I gave up.
Ps. I've 10 years of experience in programming4 -
I don't like that my team and my company uses Skype as the messaging tool for teams. There are no code highlighting when I need to share code snippet to devs!13
-
!rant
A snippet from the official W3C service worker documentation:
"This avoids the problem of two versions of a site running at the same time, in different tabs. Our current strategy for this is “cross fingers, hope it doesn’t happen”."
https://github.com/w3c/...1 -
I have been asked to submit a piece of code for review for an interview, something I'm proud of writing.
What kind of code snippet would you submit? (A custom sort.. a tricky bit of data manipulation etc)7 -
I began exploring code and graphic design early on at about 6-7 years old. My Dad had a commodore 64 with a few games and a little handbook that had some awesome examples to go by. My Dad had at one time been a subscriber to a serial magazine for Commodore enthusiasts that featured a snippet of code in each issue. After getting into my Dad's old stash of magazines I was able to combine all the magazines and write the code from each issue to create a hangman game. This got me into computers and programming. Then we did some Logo/Turtle work as got into qbasic on our IBM machine.
-
Which place do y'all go for developer related comics and memes ? Besides devrant ofc.
I actually wanted to use some in a boring article am about to write. Something with a sword and needle context, like people using heavy frameworks when a small snippet of native code could do just fine.8 -
Sometime in the mid to late 1980's my brother and I cut our teeth on a Commodore 64 with Basic. We had the tape drive, 1541 Disk Drives, and the main unit and a lot of C64 centric magazines my dad subscribed to. Each one of the magazines had a snippet of code in a series so that once you had 6 volumes of the magazine, you had a full free game that you got to write by yourself. We decided to write a Hangman game. Since we were the programmers, we already knew all the possible words stored in the wordlist, so it got old quick. One thing that hasn't changed is that my brother had the tenacity and mettle for the intensive logic based parts of the code and I was in it for the colors and graphics. Although we went through some awkward years and many different styles and trends, both of us graduated with computer science degrees at Arkansas State University. Funny thing is, I kept making graphics, CSS, UI, front end, and pretty stuff, and he's still the guy behind the scenes on the heavy lifting and logical stuff. Not that either of us are slacks on the opposite ends of our skilsets, but it's fun to have someone that compliments your work with a deeper understanding. I guess for me it was 2009 when I turned on the full time DEV switch after we published our first website together. It's been through many iterations and is unfortunately a Wordpress site now, but we've been selling BBQ sauce online since 2009 at http://jimquessenberry.com. This wasn't my first website, but it's the first one that's seen moderate success that someone else didn't pay the bill for. I guess you could say that our Commodore 64 Hangman game, and our VBASIC game The Big Giant Head for 386 finally ended up as a polished website for selling our Dad's world class products.1
-
Just found this today in the Terms for a VPN provider...
hide.me uses Google Analytics to analyze in aggregate information about our website visitors. When your web browser loads a page on our site, a small snippet of javascript code is executed within your browser which submits information about the device from which you are connecting such as your browser user-agent, language, screen resolution, referring website, etc. to the Google Analytics service. To enhance your anonymity, hide.me have opted to only allow Google to collect only a portion of the IP address. Google Analytics may also store a web cookie to facilitate the identification of users who revisit the site. If users are concerned with being tracked by Google analytics scripts on hide.me or any other site running Google analytics, we recommend installing a browser add-on which allows you to opt out.
source: https://hide.me/en/legal
ARE YOU FUCKING JOKING?!? GO BOIL WHAT SMALL MAN JUNK YOU HAVE AND EAT IT.2 -
When you decide it's not worth of your time to go through lengthy code documentation and just run that stackoverflow snippet straight on production.. 🤠
-
So today I started working on a code base someone else wrote and stubled across this and thought it was worth sharing.
Why somebody would be doing something like this is beyond my understanding.
Not commenting on the empty catch block keep in mind the whole snippet has nothing to do with rest of the code...
WHY!!!!!?!?!?!?!13 -
1. Wrote super complex snippet w/o comments.
2. Commit & push.
3. Read code after 1 month
4. Ask yourself how you wrote that.1 -
"Easily add this widget anywhere that accepts Html."
Oh, nice.
*click*
"<script type='text/javascript' src='https://company.com/widgets/...'></script>
<script type='text/javascript' src='https://analytics.com/trackers/...'></script>
<script type='text/javascript'> companyWidget3.initialize('Hello world', 'id12345', '#123456'); companyWidget3.config("https://company.com/resources/..."); companyWidget3.fetchResources(); companyWidget3.logUsage("ref=12345", annoyingTracker); annoyingTracker.notify("myass");
// other bs
companyWidget3.draw();
</script>"
Nice fucking html, fml. -
Devrant should have a snippet of the rant that is being 1+ or commented. And should combine notifs for the same rant. Easier maybe?1
-
When you have notepad++ with 30+ files open, Excel spreadsheets on the taskbar, One Note annotations all over the screen, some email drafts pending in Outlook, but you can't remember where you Ctrl+v'd the fucking snippet.. alt + tab for ages to find it pasted in the browser's url bar lol1
-
!!rant
I just hate job ads which have a pseudo-language (Java or C for ex) code snippet inviting you for an interview.
Oh my God they are so fucking LAME. I actually pass on these job offers.1 -
!Rant
Hey guys i just wanted to share my newest project with you. Its a highly customizable snippet manager currently only available for windows (sorry linux guys but the linux version is on the way). Im working on this application now almost 2 years. You can download it here: https://snipaway.futureglobe.de/
I hope you like it and would love to get some feedback from other devs (because devs are my main target audience).
Thanks to anyone checking it out :)2 -
Here’s a snippet of code that I found in our production codebase. I found this while fixing a bug. This is not part of the bug though but I see this a problem. Should I say this to my senior that his logic is off here?
First he doesnt have to do explicitly strict comparison since the return type is boolean and it could be true or false. Also the returnUrl will alway be undefined because redirectIfUserLoggedIn is called first before it was set.
He dosent like me. Hell get mad for sure. I think ill let this go.37 -
Here's something that should be an unspoken rule in the dev space:
DON'T MAKE A LESSON OF YOUR TEAMMATE'S MISTAKES (OR WHAT YOU CONSIDER A MISTAKE).
More context:
I defined a column as `mediumText` in a Laravel app. What the asshole team lead did after seeing that in my PR, is taking that snippet and blast that out in the company dev slack channel on full display, saying - "Guys we shouldn't take more space in the database than we need to. If the value for the column would be < 255 characters please take VARCHAR not MEDIUMTEXT".
I mean, what an asshole !!! You could've told me that privately and I'd have happily changed it. The reason I did so, is to be safeguard myself from the future, in case the value length increases or decreases. Last thing I want to see in the logs is "Column size is too short for column {COLUMN}, value truncated".
But nah nah, let's take a screenshot of that snippet and `teach` everyone else what should and shouldn't be done according to your `standards`.
Fucking piece of shit team lead.16 -
So these motherfuckers expect the IT guy to fix their crippled machines on a Friday evening?
Actually it's fun watching how one man's absence can throw a city into chaos.
Link ; https://mashable.com/2018/07/...
PS : A snippet attached.3 -
Reading documentation for 3rd party software... come across a code snippet which references a class. The class is spelt correctly in the comment but wrong in the code!
What??? Surely if you're going to get it wrong it would be the other way round :/ -
!rant
The new end to the idiotic code snippet head scratchers interviews (awkward for both parties but nobody is willing to admit it)?
Hometasks.
Infinite internet access, use whatever tools you want, do as much as you can in 2-3 hours.
The best non-toxic way to see how someone works as a dev.
This is the way I expect you to work, so this is the way I will interview you.
Sorry silicon valley, we don't need people who can write up a binary search algo from rote memory.3 -
I'm starting to FUCKing hate those 1-5 lines minified 3rdparty javascript snippets that everyone seems to be bombarding their website with.
Why on gods ungodly earth would you ever dream of injecting this kind of style into my <head> tag.
Without any warning whatsoever.
You couldn't be FUCKing bothered to be thinking about the consequences, before pushing such an update to your production server.
That's how you leave your users website broken, or ugly af.
I know it's an easy fix, simply remove the snippet that injects this crap, if only I was allowed to say "no don't keep this FUCKing crap" to the customer.2 -
does my co-worker code is actually really necessary, for the sake of arguments lets ignore server performance, and focus on this snippet.
added comment on the side of the parameters11 -
When I wrote a code snippet on an exam paper📄 during college🎓 days and the lecturer compiled ✔️ it without an error.2
-
As a dev, I have to reuse a lot of codes again and again. Some I've written, and some of them I found after stucking my head for 1 hour on StackOverflow.
Now, the problem is every time I need the code, I have to search again. Some of them I saved in note apps but organizing code snippets & finding them with a quick search is a mess.
I was thinking of building a code snippet organizer where developers can save code snippets in any language (have syntax highlighting), search quickly, share with anyone, create buckets, manage multiple accounts etc.
Let me know if it's a good idea or not. Would you be interested in using something like this? Is this even a real problem or it's just me?15 -
!Rant
Hey guys I need your help.
I have developed a snippet manager which currently is used by over 280 users from a lot of different countries on a daily base, which is very nice.
(For those wondering the app is called "SnipAway" just search on it on Google it will pop up)
But my main problem currently are the translations. I've created them using Google translator mostly for the languages I don't speak.
I would like to ask for some help from my fellow devRanters. I would need translators for the following languages:
Italian
Spanish
French
Russian
Japanese
Turkish
If you can help translating please comment so I can send you the translation file. The file is not very big so translating it should not take long.
Also if you speak another language that's not in the list above still comment i wouldn't mind to add the language to the app.
Thanks9 -
How do you feel about using TypeScript with React? I appreciate the benefits, but, as every snippet of React code everywhere on the web is vanilla JS,I just don't want the cognitive overhead.
Yes, I know TS is JS, but, if I'm not going to use the features, why bother? I'd want to strongly type props, state, etc.
What's the status of TypeScript support in the React ecosystem (eg Router, MUI, etc.)?
I'm kinda hoping Reason will get some traction as the type inference is much better, but, will that happen? Or is that going to fizzle so it's a choice between TS and JS?
Appreciate any thoughts on this---including those from anyone who's in the same boat.
Looking for views on TS in React ecosystem---no need to sell me on TS in general.6 -
Why is it so fucking difficult to delete saved passwords from your Google account? I tried deleting all in Chrome, but as soon as I launched Chrome on another computer all the passwords synced down. And in the online console you can only delete them individually. Luckily I found a JS snippet that grabs all the button elements and clicks through them, but why does Google have to make this so difficult? Fucking hell.1
-
I still don't get it why we don't have code snippet paste ability, like slack or .MD file? Can we have some little formatting please?
Pasting screenshots is not always the best.3 -
I’m broke you assholes thanks to what people did to the system !
Click maybe later on Wikipedia to see the most obnoxious web design snippet to date !13 -
When I finally learned how to use vertex lists with OpenGL bindings in Python and optimized my game's tilemap rendering. I think it is my best written code snippet so far. It took me weeks to finish it.1
-
executing back to back awkward experimental snippet successfully.... a dream come true... thinking 💭 of making loop of that day.
-
I have small knowledge in programming in Java, have not learned it in a couple of months, and I was wondering, how do you take what you know to make a larger piece of software. HTML and CSS seems easy in comparison as I know how to a websites but, I can't comprehend Java programming.1
-
what is the weirdest thing (library, framework, code snippet) in your opinion which you've used in production?
we are using a library that on every exception prints for us URL to StackOverflow related problem in the logs2 -
I hate it so badly when syntex highlighted code snippet on a web page goes to plain text on double click. Anyone knows it's purpose?7
-
This is a true story when I was working as a application technician a couple of years ago!
Before I started working there, they had a couple of incidents with ppl with less knowledge accidently deleted stuffs in prod databases, and only a handfull of ppl get the full access to them. I started working in this team, and one day I was asked to run a snippet in one of the prod databases from a co-worker with less privilege.
Loged in, run the snippet and the server STALLED for a couple of minutes! When the snippet was finished I looked at the screen and saw the output "1724217 rows deleted". The fun part here, was that we went to a coffee break right after this, and after a couple of minutes we started to hear ppl mumbling that the network was slow as f*ck, servers didn't respond etc etc.
Well, I responded that I got a snippet that deleted 1724217 row in a table and we ran back to our computers and started to work backwards to solve this.
The best part in this story is that:
* Was not my fault! Even thou I was the one that executed it.
* The tables was deleted from a live prod server that was not heavily used!
* I asked for a life line for us in this team, that we needed a prevented output so we can "match" the actual output after we ran it in prod from the ones from the developers!
Even thou it was not my fault, this is the worst mess up I have done working in IT over 10 years. O_o8 -
Ah, the ancient art of copy-paste development – where originality goes to die and bugs come out to play. It's like a cursed incantation that tempts even the best of us into the dark abyss of shortcuts.
You think you're saving time by copying that snippet from Stack Overflow, but little do you know, you've just invited a horde of gremlins into your codebase. Suddenly, your once-cohesive architecture looks like a patchwork quilt sewn by a drunkard.
And let's not forget the thrill of debugging when you realize that the copied code references variables that don't even exist in your context. "Ah, yes, I remember copying this gem at 2 AM. What could possibly go wrong?"
But wait, there's more! Copy-pasting also introduces a special kind of chaos when updates are needed. You find yourself fixing the same bug in five different places because you couldn't be bothered to encapsulate that logic in a reusable function.
So here's a heartfelt salute to all the copy-paste warriors out there, bravely navigating the treacherous waters of borrowed code. May your future coding endeavors involve more thinking, less CTRL+C, and a lot fewer late-night bug hunts!1 -
when a senior recommends you rewrite some code with their example snippet (which doesn't work), for the 3rd time, on a different ticket
i guess i should've called them out on the 2nd time this happened, instead of silently not doing so think i'd save them some dignity after telling them the first time they did this, their recommendation didn't pass automated tests4 -
Arrify nodejs module. I always thought, that a modul is something bigger, not this function with 4 lines. Who thinks, that using a module to make an array of a value instead of copying a 4 line snippet to your code is actually a good idea?4
-
When you copy&paste a code snippet from a forum into your IDE like VS and suddenly - for some reason - after every single line comes an empty line that you first have to manually delete so that your OCD doesn't bite off your own head.4
-
So I'm working on a snippet of JS to generate widgets for a custom data dashboard at the moment, in a project where I've been paired with a junior "developer" (he's more of a junior script monkey though), which is just plain painful...
Recently he wrote up a long message bitching about how my library API keeps changing, making it impossible for him to get any of his work done.. This particular message even made references to "writing his own widget library" and "stabbing me in the eye".
It's currently at version 0.1.0-ALPHA, just by the way. Major version 0 mother fucker.
Anyways, one of my colleagues stepped in the other day to try help him with the front-end stuff, which finally helped me get the feedback I was asking for. At which point we found out he's still currently working off a build I gave him 4 fucking weeks back.
Honestly though, I'd both love and hate to see him try make a library to do this: pull data from a non-standards company data API, parse said data from unnamed number arrays nested up to 4 levels deep, then morph that data into one of four different charts or one of five made up of custom markup.
All he has to do is create a UI to configure and present my widgets, but he can't even figure out how to integrate dependency management into his front-end project.
O.o
OMG. Can I stab him?? Pretty please?1 -
I think the dev missed a nullcheck before `handlebars.compile(name)`, don't you think?
// this snippet is from our product's repo ;)7 -
Rule: NumberIdunno,
It's easier to figure out a solution yourself than it is to clean your code, recreate the bug in a small snippet then posting it on Stackoverflow.2 -
Ah, yes, the ages old dilemma of a piece of shit function written in-between taking long drags out of a fucking crackpipe being more reliable than the refactored version; how delightful.
Now, they say broken code from cleanup of sketchy bits is better than any working snippet whose reading feels as pleasant as being repeatedly slapped with a decaying rhinoceros testicle sack, but I'll be fucked if I don't __sometimes__ feel like I just *might* prefer eating the maggot soup out of the rotting fucking gonads of deceased male pachydermata than deal with this kind of shit: feet facing backwards and all that.
Ugh. If only I could live my life without everyday feeling like I'm on a pointless quest to slay a mother fucking dragon, where everytime I get to the castle I'm suddenly a mustachioed italian plumber stepping on turtles and my bitch is in another sicillian ghetto. You know, basic shit.
The good thing in seeing these old errors pop up again after my shoddy bandaid of a patch is taken off is that I'm finally experienced enough to realize that my ~ A P P R O A C H ~ was wrong to beg with. And this is VERY nice, because I came in to do some trivial maintenance of forgotten code, and now I have a plan for correcting a very small and silly but definitively annoying as fuck design error.
Why am I so annoyed then? Because it's more and more work, it never fucking ends, and I can't EVER take a break: with apocalypsis incoming, as we have clearly seen in the stars, tea cups, palm readings, crytal balls, ouija boards, and also in the cover of old-school pornographic magazines nailed to the wall of a defunct newspaper kiosk, the fear of economic collapse is somewhat too real to even THINK about any kind of necessary vacation.
And so: fucking shit, here we go again... TIME FOR MORE COFFEE.
<ad> But have YOU ever picked ingesting the hairy BALLS of a large mammal over doing your stupid job in a proper way? Is the ghost of your dead self haunting the hollow being that remains in this meaningless plane of existence? Do you lull yourself to sleep by chanting dark prayers to the Horror Immemorial with a heartfelt desire for the sweet release of death?
While it may be true that your corporate masters are keen on savagely raping your every breathing hole from the ass up to your fucking eyesockets on a daily basis, there's no good reason NOT to have a good time -- and with the help of ScalySalad, you will be able to unwind in the evenings by realizing your *supressed* childhood dream of debouring the certified, lab-tested, 100% authentic, gonorrhea-infected ASS of a sewer-dwelling lizard man!
ScalySalad pimps only the FINEST specimens of failed, government-sanctioned and highly clandestine experiments for your lacertaerotic pleasure. These proud and noble creatures were once human beings, until they were kidnapped by [CENSORED] in order to be used as weapons of war against their enemies. And for the lowlow price of GABTRIDTIHSTAE, you will be among the few lucky ones to experience the GLORIOUS taste of their anal cavities before they go extinct!
Go NOW to triple.doble.you dot. dot you.www www.triplewww.wwwwwwwwwwww dot if you click and it's malware you deserve it DOT com, and use my promo code SALAMUNCHER for 20% OFF on a date with a homeless societal reject turned prostitute after being [CENSORED] by state scientists!
Illegal inter-species fornication has never been easier! Thanks to ScalySalad for sponsoring this �vI�n��lK�^�3��V#^B�^NI�%^G�v�|3I��.1 -
"This deal is an important step towards correcting a situation which has allowed a few companies to earn huge sums of money without properly remunerating the thousands of creatives and journalists whose work they depend on.
At the same time, this deal contains numerous provisions which will guarantee that the internet remains a space for free expression. These provisions were not in themselves necessary because the directive will not be creating any new rights for rights holders. Yet we listened to the concerns raised and chose to doubly guarantee the freedom of expression. The ‘meme’, the ‘gif’, the ‘snippet’ are now more protected than ever before.
I am also glad that the text agreed today pays particular attention to sheltering start-ups. Tomorrow’s leading companies are the start-ups of today and diversity depends on a deep pool of innovative, dynamic, young companies.
This is a deal which protects people’s living, safeguards democracy by defending a diverse media landscape, entrenches freedom of expression, and encourages start-ups and technological development. It helps make the internet ready for the future, a space which benefits everyone, not only a powerful few."
- Axel Voss, 2019 -
Quick JS tip
If you want to split a string into characters, you can use the ES6 spread operator
If you have
const name = 'react-dev'
You can just spread it like this:
const charsInName = [...name]5 -
When you have no time to learn by code snippet, you'd have to copy and paste it rather than writing it line by line.
-
A v dumb C language question....
Consider this code snippet:
{
while( getchar() != EOF )
printf("a");
while( getchar() != EOF )
printf("b");
}
Is there some way to get inside the second loop? After I input some text, ctrl+D sends in the text stream and loop 1 executes, then the control waits at the test for loop 1 again, pressing ctrl+D again triggers EOF, but it ends up skipping all loops after24 -
tldr: i take pride of our code! It hurts when someone calls it wrong when i know it was right.
So there was this integrations team that are trying to connect to our api. This team has been throwing different people to work with us. We even taught them how to use postman/soapui with ssl, even to the point that we search stackoverflow to resolve their code-level issues and left us halfway, then came back again repeating all process. A year passed, they came back with the same issue... now all answer that they get from us was to “review past conversation”, Today, they insist that we repeat ssl onboarding process as they are having issues with their current one, we insisted not to do it, and told them we (including them) can proceed without changing the client ssl. And told them we had a snippet sent to resolve their issues, but instead told us in a rude way, our sample is wrong. I was challenged to prove that we can make it work by eod. With their wrong sense of pride as theyve been working for that issue for long, they started throwing tantrums on us, saying that we do not need to make them feel that they do not know what their doing. man! Cmon, its you who requested that snippet few years back, then you tell us you dont need it as it is not working, in the first place, it is not our job to code for you asses,...i left the channel after. it was escalated quickly to management and accounts team(those people who only cares for traffic/money).. asked to return to the channel, spoonfed the details to them, provided a working snippet and left again.not sure what happened next.,. I hope this started a fire on our management to handle such incompetence. -
When you don't compile small code snippet and keeps on writing lines of codes and after writing large lines of code that one moment when you start compiling your code for the first time
Brace yourself for errors 😕 -
Anyone got too used to ChatGPT until now google feels like a caveman tool?
if you tell chatgpt to write code that uses library X that does something it will provide the snippet ready to be copied
whereas googling it means you have to scroll through results, pray someone asked it on stack overflow before you, otherwise skim through medium articles until you find a code block or something
and yeah ChatGPT doesnt always write working code coz of the knowledge cut-off, i switch to bard sometimes or default to google11 -
"Oh, i know exactly which file this snippet goes in! I'm glad the author of these docs didn't waste a precious few extra seconds to tell the reader where this is supposed to go."
- An excerpt from "I'm Not an Impostor, and Other Lies Developers Tell Themselves" -
!rant
Can we bring into discussion inline monospaced code snippets again?
Basic markdown text formatting. Like bold, italics, lists.
https://devrant.com/rants/333316/...question dfox functionality request feature inline code code snippet trogus markdown feature request3 -
If I code 10 to 1 or 2 I can have good sleep..but in any case if I sleep eaely before 1 then code snippet and bugs come in dreams.........
..
Even if I sleep early when I'm too tired.. -
just wanted some help from you people..
if anyone knows some sort of Code Snippet Manager or Gists Manager.
I want to store my code snippets (public and private) with the following abilities:
1. Search the snippets
2. Tag the snippets
3. Code highlighting
4. Cloud Stored Snippets
5. Is free
I've found Cacher and Lepton but Cacher allows only Public snippets in the free version and Lepton lags search ability.
Anyone know a better client for this purpose?8 -
Worst fear while adding a snippet of code from the net to my project :
I hope this doesn't mess up other UI elements.2 -
Dont know why but on the occasion that i throw out a 'do while' snippet of code i chuckle to myself.
-
One of my side projects was on hold for 8 months because I ran into a minor technical issue maintaining consistency between snippet generation in a few places.4
-
It feels like there is a rule of the internet that any code snippet visible is immediately subject to review by the comments.1
-
I have learned most of the keyboard shortcut for the IDEs i use. My favorite keyboard shortcuts are VS's.
Let's not forget about snippet -
found this interesting snippet tool for all javascript devs out there: https://github.com/30-seconds/...
found it useful! -
Currently working on a snippet manager application in my free time.
Added support for c++,c and codffe script. Added them to my supported languages array to use them inside the editor.
Just to realize that now all my test snippets i created for testing are using the wrong language for the internal code editor.
Well Fuck me! Deleting all snippet files now and changing the system to be indipendent of the array index. -
Ok... I am defeated I don't know what else to try...
Do you guys have any experience with ansible vault? I have my SSH password stored on a vault. It's referenced in my host file like this:
-----START SNIPPET-----
[LCL:vars]
ansible_ssh_pass='{default_pass}'
[LCL]
myhost ansible_user=my username
-----END SNIPPET-----
default_pass is stored as a yaml variable in passed.yml that I supply using --extra-vars '@passwd.yml'
When I enter my vault password I get an exception 'non hexadecimal digit found'.
The password is right for the vault, the vault file is in PWD .... I cannot find anything helpful.
Any ideas?1 -
Couple days ago, I started working on online IDE using https://ace.c9.io/ .. All the functions they have are good, but documentation wasn't that good and I had to learn things by my own. I customized a theme for it to look more like atom lol, added snippet menus and some other stuff, but thinking about it the reason I started is that i saw Thimble by Mozilla and felt jealous because it looks so cool, and I want to make some thing like it.8
-
In finals, I was prepared to write code for any given problem. Instead, the professor gave code snippet itself for all questions and asked to write output. No comments, nothing. Just pure spaghetti code. Wasted so much time in analyzing the code that I had to leave a couple of questions unattended. Moreover each question weighted for around 8 marks. So, just one miscalculation means 8 marks is into the void. I'm feeling like I'd get just enough marks to clear the subject.1
-
I came across this code snippet on Quora, and I tried crashing the Codeforces server (strictly for educational purposes). But this thing wouldn’t compile, either because fork() was not declared in the scope, or the file <unistd.h> was not found. I tried it on different C++ machines. What is the fix for this ?6
-
I develop for a Minecraft server, (Ik, MC is a dead meme, etc.) and I got a snippet of code from a kid one day asking for help debugging. He was missing a square bracket. How relatable.
-
While true {
Paste snippet into VS
VS auto-formats on paste
Remember ya told yourself to turn off auto-correct on paste in VS
Deal with it for now
Forget to turn off auto-formats on paste
} -
For those who are on my team, arguing on not putting comments in their code:
How much ever (un)readable your code is, any peer / reviewer / future team member can only understand what that code snippet is doing, but not why was it written in the first place or what the hell you were thinking while writing that logic. So, it'll be awesome if you write that as comments or at least link to the story/design doc which warranted that code.3 -
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
int count=0;
for(int i=0;i<n;i++){
cin>>arr[i];
count^=arr[i];
}
cout<<count<<endl;
}
return 0;
}
In the above program,
how does this code snippet work?
count^=arr[i];8 -
I spent fuckin whole day on a defect..
I made a cma content using fatwire in which I added £ on a html snippet and it converts to (£) and when I use it in page it shows £ even it's in utf8..
Can anybody help? -
Please give me code snippet to create windows ec2 instance using boto3 within aws free tier limit.
import boto3
# Create an AWS session and EC2 client
aws_management_console = boto3.session.Session(profile_name='....')
ec2_console = aws_management_console.client(service_name='ec2')
def create_ec2_instance():
try:
print("Creating EC2 instance")
ec2_console.run_instances(
ImageId="....",
MinCount=1,
MaxCount=1,
InstanceType="t3.micro",
KeyName="...",
SecurityGroupIds=['...1'] # Specify your security group ID(s) as a list
)
except Exception as e:
print(e)
# Call the function to create the EC2 instance
create_ec2_instance()
Have i missed anything in this code?
It's running fine not creating any instance.4 -
Typescript is so fucking frustrating sometimes to deal with
The snippet above AND below do the EXACT SAME FUCKING THING. But because you double tap, it loses the fucking (not needed) type before the mapTo. If you aren't paying attention, you get this extremely fucking aggravating wall of red.
God damn it, can't this be better? RxJS is pretty fucking important, so why is this so god damned hard to just get some coherent fucking code highlighting!?
/rantover4