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 - "2 in 1"
-
Playing 'Skip-Bo' with my daughter.
She: "Why isn't there a zero in this game? You know...0, 1, 2, 3, 4, 5...."
MY daughter ❤️.10 -
1. Doesnt want to pay for server
2. Doesnt want to pay for disk
3. Doesnt want to pay at all
3. Wants the app in 1 week17 -
🤔 If developers were linguists...
Person 1: How do you say "????" in Italian?
Person 2: Why don't you use Japanese? It's a much better language.6 -
How to become a developer in 2016:
Step 1: Install Linux
Step 2: Brag everywhere that you've installed Linux and removed Windows
Step 3: ?????
You are now a developer15 -
1. Forgot my password.
2. Clicked "Forgot" password button.
3. Received my forgotten password as plain text in my email7 -
Boss 1: You have such a dedicated team of workers, how do you make them all come in time?
Boss 2: Its simple, 30 employees, 20 parking spaces.14 -
HR Project update meeting.
Duration: 1h
Content:
1) recap of previous meeting
2) overview of what we will discuss in next meeting.2 -
How to get your Jira ticket resolved:
1: Assign in it the person
2: Mention him on the ticket
3: Remember the ticket number
4: Sneak into his office
5: 10 -
1. You will write ugly code. Code that is in dire need of refactoring almost immediately.
2. You will write brilliant code. Functions and algorithms that will impress all that use them.
3. 1 & 2 are not mutually exclusive. Good software can be written poorly, beautifully written code can be useless. At the end of the day, just get the job done.2 -
Confession of the day:
1. I work in release mode
2. I work on the main branch only
3. I test on production13 -
10-1 AM - 4 of us got drunk.
2-4 AM - 2 hours straight coding, solving big-ass problems
10 AM - Fucking hangover and python code in a java project!4 -
1/2
This app's change log is hilarious 😂
I want to smoke what they smoked while writing it.
Part 2 in next rant 😂7 -
Cook A:
1 - Makes a soup
2 - Leaves a mess
Company: ☺️ What a nice cook, here's your promotion to senior Cook.
Cook B:
1 - Cleans kitchen
2 - Makes soup
3 - Cleans after themself
Company: 😡 What took you so long!? Cook A made it in 1/3 of the time.
This is the pattern I've seen so far in development... and it's sad20 -
Annoyingly typical office conversation:
Person 1: "Good morning."
Person 2: "Good morning, how are you?"
Person 1: "Good. How are you?"
Person 2: "Good."
Person 1: "Good."
NO! Not good, fuckers. I hear this all day long, come up with something real or original. Talk about the massive shit you just took, or how hard you're taking the news about Diablo Immortal. It reminds me of that scene in Office Space with the repetitive call center lady, lol.17 -
Theres only 2 kinds of people in this world:
1. var username;
2. var user_name;
Hint: one of them will burn in hell57 -
1. Started to program Python 3
2. Thought of doing a little program just for fun
3. Now 1 1/2 years in developing state with nearly 3000 lines of code and 11 modules
4. Python skills :)14 -
Try this line of javascript in a browser:
<pre id=p><script>n=setInterval("for(n+=7,i=k,P='p.\\n';i-=1/k;P+=P[i%2?(i%2*j-j+n/k^j)&1:2])j=k/i;p.innerHTML=P",k=64)</script>8 -
That moment when your game appears on some Formula 1 Hungarian website and your server's network transfer is gone from 10 GB left to 2 GB left in just 2 days... But still - I'm proud of myself
http://formula.hu/parc-ferme/1654910 -
Coworker 1: Ugh, what name should I give this variable? Any idea?
Coworker 2: Doesn't matter that much. Just give it a name.
Coworker 1: ** Types in "albert" **6 -
1. Applied to a tech company based in Seattle
2. Interviewed
3. Got rejected because "At the moment, they do not hire international students."
Then, why did you interview me in the first place? :')4 -
Trust me, I've been doing this for years.
Best way to deal with numbers in JavaScript:
let x = "1"
x += "1" // add one
x.length // get value of number, 24 -
Idealistic goals:
1. Learn python
2. Start a project and see it through
Realistic goals:
1. Learn how to initialize variables in python
2. Make plans for 20192 -
How millionaires deal with laptops.
1. Buy a gaming laptop.
2. Install any OS.
3. Open IE11.
4. Place cursor in the new search bar in top right.
5. Type 4k wallpapers.
6. Download anything.
7. Open in MS Photos.
8. Right click, Set as > Wallpaper BG
9. Leave it in the corner.
10. Sell it at double 2 days later.14 -
Overheard this conversation today:
1: look at this! My shiny new iPhone can measure stuff!
2: how accurate is it?
1: not very, it is pretty buggy.
2: how did the bugs get in there?
3: it is an apple so4 -
It was a basic java lesson. We had four values that we stored in a array. We had to make some calculations with the values. Then we had to sort those four values. That's the solution our teacher proposed:
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}
if (arr[1] > arr[2]) {
int temp = arr[1];
arr[1] = arr[2];
arr[2] = temp;
}
if (arr[2] > arr[3]) {
int temp = arr[2];
arr[2] = arr[3];
arr[3] = temp;
}
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}
if (arr[1] > arr[2]) {
int temp = arr[1];
arr[1] = arr[2];
arr[2] = temp;
}
if (arr[0] > arr[1]) {
int temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
}7 -
Drunk Dev 1: These wifi signals are really take toll of brain tissues and may probably cause brain cancer. 🙁
Drunk Dev 2: Let’s power off our wifi router. We don’t need wifi while drinking. 😏
Drunk Dev 1: Good, but what about other wifi signals in proximity. Your neighbours ?? 🤨
Drunk Dev 2: Oh poor, they wont get into our brains as our brains don’t have password for their wifi thus, we can’t connect to their access point 😎
Drunk Dev 1: 😳6 -
When you see a Java devotee using Python and they're doing something like this:
array = [1, 2, 3, 4]
for n in range(0,len(array)):
print(array[n])
At least I get to tell them "hey it doesn't have to be so hard just do it like this:"
array = [1, 2, 3, 4]
for n in array:
print(n)12 -
Alone on valentines?
1: Buy 100s of plastic rings
2: Hide in the kitchen of a fancy restaurant
3: Put rings in glasses of champagne
4: Watch5 -
- Did someone tested it on our test machines?
- No there was no time to do this.
*preparing for nuclear fallout from customer in 3..2..1..*3 -
Overheard 2 colleagues having an interesting telephonic meeting late night at my room.
Dev 1: Wait. I am trying to fix it.
Dev 2: Ok. Take your time
Dev 1: Shit. I found it. I knew I was doing something wrong here.
Dev 2: Oh. Nice. What was the bug?
Dev 1: It was a super silly mistake. Don't want to tell. Folks will laugh at me.
Dev 2: Don't worry. It happens with everyone. Come tomorrow at office, and whisper it in my ears. Noone will know.8 -
How to be a great developer - 101
1. Write Code
2. scrap it
3. Rewrite in a better way..
Repeat! 😂1 -
What NOT to create in 2018:
1. macOS note taking apps in Electron
2. Text editors in Electron
3. Pretty much everything in Electron
4. “Simple” and “minimalistic” programming languages
5. Web frameworks4 -
My plan:
1. Draw the logo in paper with black marker
2. Scan with the infamous printer
3. Load in GIMP
4. Edit some parts
5. Put some colors
6. Print or save as image file
7. Use everywhere
As I start to do step 2, I noticed something VERY wrong.
FML24 -
Dear windows 10
I won't mind a weekly 30 minutes update but...
My ubuntu connects to wifi in 2 seconds
My lubuntu connects to wifi in 2 seconds
My archlinux connects in 1 second(don't ask why)
My raspbian starts up and connects in 10 seconds
WHY WOULD YOU TAKE MORE THAN A SYSTEMS BOOTING PROCESS TO GET CONNECTED?12 -
Always answer these 2 questions in your commit message: (1) what will happen if this commit applied? (2) why this change is being made?2
-
How to be a successful developer:
1. Identify a problem that you don't know the answer to.
2. Spend 10 minutes searching Google for a solution, trying various keyword combos.
3. Click the link to the solution in Stackoverflow.
4. Find the solution with the most +1's.
5a. If solution looks good, implement the solution in your code.
5b. If solution is not applicable, return to step 2.
6. Test your implementation.
7a. If the problem is solved, bask in the glory of success and return to step 1.
7b. If the problem is not solved, move your hand vigorously through your hair, pulling out several strands. Exhale loudly. Next return to step 2.4 -
Saw time in a digital clock (HH:MM) [05:14] thought I should take a 1 minute break and decided to start at 05:15.
2 seconds later its 05:15......fuuuuuuuuuuuu3 -
Ruby’s fanciness bit me in the butt today. It’s pretty rare, but often confusing AF when it happens.
array = [1, 2, 3, 4, 5, 6, 7]
array.count +1 +2
# => 1
What the fuck?
array.count +1 +2 +3
# => 1
What the fuck?
+1 +2 +3
# => 6
Okay.
(array.count +1 +2 +3)
# => 1
What the fuck?
(7 +1 +2 +3)
# => 13
Okay...
array.count + 1 + 2 + 3
# => 13
Alright, so spaces matter here...?
((array.count) +1 +2 +3)
# => 13
But not here!? ... Oh. I think I know what’s going on.
Array#count
Returns the number of elements. If an argument is given, counts the number of elements which equal it using ==
Well fuck me.
Ruby is seeing `array.count(+1+2+3)` instead of `array.count()+1+2+3` since `+1` is a value, not an operator followed by a value as is the case with `+ 1`.
Now, why was I using +1 +2 instead of adding some spaces like I normally would? So they would match what was in the comment next to them for easier reference. Heh.
Future dev, I did this for you! So this is all your fault. :|36 -
Let's see the coder in you.
If I give input: 1 output: 2
If I give input: 2 output:1
Only these two test cases needed.
You should not use control structures such as if,else,for,while,switch etc. (The answer is simple) (Don't cheat)
int number;
cin>>number; //get number
cout<<??????; //Your code53 -
1. Participate in an online hackathon
2. Upload demo video to youtube
3. Submit in the last minute
4. Come back 1 hour later to see video removed due to length violation.
FML :( -
1.) Make Linux slightly more popular on the desktops.
2.) Windows 11 is actually a Linux distro.
3.) Let JavaScript burn in hell17 -
Best mentoring advice I've gotten:
In your career you'll meet three kinds of people.
1) Nice people
2) Indifferent people
3) Not nice people
Treat them all in the same way. That's professionalism. -
I was about to use the Duolingo but I think it triggered me to hard. 2 mistakes in a row.
1. I have Portuguese origins and they used the Brazilian flag
2. I was born in Luxemburg and they just used our flag for The Netherlands (I know they're pretty similar but cmooooon)15 -
Every Group Project in CS Major
Group 1:- Hey group 2 what project are you making ..?
Group 2:- Can't tell , Top Secret
FINAL Day:-
Group 1:- Railway Ticket Booking System
Group 2:-Railway Ticket Authorization System
Evaluators :- I think I saw similar idea somewhere....😂3 -
THE RULES OF TECHNICAL SUPPORT
Rule #1: The Customer Lies
Rule #2: Rule #1 still applies when the customer is your coworker
Rule #3: Customers following instructions is like characters dying in a movie: if it didn't happen on-screen, it didn't happen.1 -
Steps to writing Javascript in 2018:
1. mkdir and touch necessary files.
2. install and configure babel.
35. Start configuring webpack.
900. open app.js11 -
Colleagues talking among themselves about gods, form of higher power, etc.
Colleague 1: *to colleague 2* So you believe in superhumans?
Colleague 2: I believe in God.
Colleague 1: *to me* What about you?
Me: Yeah. Superhumans exist. I have to deal with them everyday. Because stupidity levels that high aren't practically possible in normal humans.2 -
To my friends in Ireland, stay safe tomorrow, it's probably going to be nasty storm. Good luck and
1. Git commit
2. git push
3. git out3 -
*Fun with Javascript
`Math.ceil(1.0000000000000001) // output = 1`
`Math.ceil(1.000000000000001) // output = 2`
I hope it'll lit a spark in your mind.5 -
My coffee to water ratio in a cup is starting to be 1/2. I'm worried in the future I will be eating coffee not drink it anymore 😂4
-
How to solve a problem in 7 steps.
1. Google
2. Open links
3. Read
4. Copy
5. Paste
6. Run
7. Repeat until solve2 -
>Instructions in the manual -
1. Install Python 3.5
2. After installation is complete, open a new terminal/command prompt window and run 'pip install pandas'
3. Done!
>Client
1. Installs Python 3.7.2
2. Types Python in command prompt, types 'pip install pandas' there
3. Raises a hue and cry over the program not working because the instructions were not clear
Smfh...1 -
Reading the comments in a piece of code:
{
//Step 1 save stuff in a list
code();
//Step 3 Update the controls
morecode();
//Step 4 Resize the UI
somecode();
}
//Me thinking: where the f*ck is Step 2?16 -
Wtf!
0. My name is not Den
1. I never registered an account at Wallmart
2. I don't live in the USA
3. How the fuck did my e-mail end up in their DB18 -
1. talked to a dev and found out he never used git
2. saw a guy formatting the code in eclipse line by line, even when eclipse provides automatic formatting.2 -
1 - when I actually got the point of OOP
2 - When I got that I could check if a number was odd or even by doing & 1
3 - (in the future) when I will understand lifetimes in rust.20 -
DELETE FROM TABLE invoices.
The next week was spent inputing the data by hand because:
Who needs database back-ups?2 -
Two programmers have been arrested and currently sit in a jail cell.
Programmer 1: Hey I think we had too much too drink.
Programmer 2: I believe that is a logically assumption.
Officer: You have a phone call.
Programmer 1: Yes, it's my lawyer!
Phone: Is Steve Smith ?
Programmer 1: Yes, who is this?
Phone: Hi, this is Jane calling from Tech Hub Recruiting....
Programmer 1: HOW DID YOU FIND ME?!2 -
1. Success in supporting my wife for her personal goals
2. Quality time with my family, especially with my daughter
3. Maintain my current brain abilities2 -
I want to do 3 things in life:
1. Learn new technologies and don't work at all just learning.
2. Play video games.
3. Eat without getting over weight.10 -
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 -
Fav items on my desk:
#1: "Rubber duck" and stressball all in one
#2: my motivation to keep working so I can afford this car some time :D5 -
Allright, this one begs for a rant.
Me (Linux boi):
0 checkout code
1 update local config file
2 compile
3 deploy locally
4 run
5 use
Coleague (Windows boi):
0 checkout code
1 update local config file
2 compile
3 deploy locally
4 run
-1 "configuration xyz not found in config file"
→ goto #3
After 4 attempts:
ø windows.reboot()
3 deploy locally
4 run
-1 "configuration xyz not found in config file"
3 deploy locally
4 run
5 use
// out of curiosity...
3 deploy locally
4 run
-1 "configuration xyz not found in config file"
NO side actions taken (no configs updated, no code changes made, no nothing. Just simple double-clicking the redeploy script again and again)
Now... How do you objectively explain THAT?
http://weknowmemes.com/2013/01/... IRL :)8 -
Scenario 1
Friend 1:"Hey, you're good at computers right?"
Me:"Erm yup."
Friend 1:"Can you hack Instagram? I've lost my password."
Me:"Oh My God."
Scenario 2
Me looking at a friend's unity C# code
Me:"You know there's an enter key right? Why is your code horizontal not vertical?"
(Means that after a semi-colon he continues his code)
Friend 2:"I like to read my code in horizontal, that feels natural to me"
Me:"What ever, as long as it works. But why do you have so many if function inside another if function?"
Friend 2:"Cuz I want the player to do this while moving"
Me:".........."3 -
Estimating the task. A total of... 2 months.
Other guy: I think we should squeeze it to 1 month.
Others: I think we should squeeze it in 2 weeks to meet the deadline..
Deadline: 2 weeks
Progress:25%4 -
Tomorrow's my last day.
There is no exit interview scheduled. I'm not surprised, there hasn't been any 1-on-1's in about 2 years, and any feedback or complaints are never addressed.
Just need to bite my tongue for one more day.1 -
1. It pays the bills
2. It pays pretty good
3. I'm typically the best looking dude in the office, so it gives me a great ego boost2 -
Having an philosophy exam in less than six hours. It's 2 am. Laying in bed, thinking about that stupid DNS bug and how to fix it. I have 4 1/2 hours of sleep left - wish me luck ¯\_(ツ)_/¯4
-
Random almost tech guy at workspace
1. Opens Google Chrome
2.Types... www.google.co.in in the OMNIBOX
3.Hits enter
4.Types search query.
God just committed suicide meanwhile.4 -
Step 1 - Start with socket.io in NodeJS to create chat extension for browsers
Step 2 - Let's authenticate the users
Step 3 - Cry7 -
Burnout signs:
1) laying in bed all day
2) watching old natgeo documentaries
3) ordering a dildo for my loud ass neighbours6 -
Our Product Manager is so amazing that,
1-> She writes FEEDBACKs in Trello
2-> BUGs in MS Excel
3-> and Upcoming FEATUREs in her DIARY
and best part is She used to work as Developer in MnC2 -
Searching for other occurrences of highlighted word in Android Studio
1 - highlight word
2 - CMD+F
3 - Enter
In Xcode
1 - highlight word
2 - CMD + C
3 - CMD + F
4 - CMD + V
5 - Enter4 -
What are your most used commands? Find out by running:
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head -110 -
1 - Writing a 20 lines Python module in 15 minutes approx.
2 - Accidentally deleting this module.
3 - Taking 1 hour finding a way to generating source code from the compiled PYC Python file.1 -
Nope, in my place it is...
1. Chrome
2. IE
Thank me later when you get a job here, probably shouldn't8 -
1.ReactJS sucks ass.
2.Full stack developer is myth.
3.Multiple languages makes you impotent to fuck in any single given language.
Two truth and a lie.15 -
Me in the Gym 😃😉😀
weights = [12.5, 15, 17.5, 22.5]
sets = 0
while (sets <2):
for i in weights:
print(i)
print("Rest")
sets = sets + 1
And people say keep your work at office.10 -
Me: Why did you exit the build?
Webpack (W): Build exited with code 2 - Eslint error at 2:1 in *filename*.scss 'Expected 2 line indent'
Me: internally *ARE YOU KIDDING ME?!?!?!? YOU FAILED OVER AN ESLINT STYLING!!!* *curses out original dev profusely under breath while fixing styling*4 -
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 -
1. Finish 8bit computer
2. Program an assembler
3. Find a girl friend
Can you guess which one will be in my new years resolution next your too?4 -
1. I don't have to use headphones to listen to music. Can listen in speakers and avoid my ears being sweaty
2. No random interruptions from anyone. Interruptions are usually from slack messages and emails which I can decide when to look at
3. Have a solid 1 or 2 hours for coding (because of the above 2 reasons)
4. The time spent in commuting is instead spent on nap or relaxing -
You think arrays starting with 1 are annoying?
HA!
How about time in a day starting with 12?
12:00, 12:45, 1:00, 1:45,...,11:45, 12:00, 12:45, 1:00, 1:45, ..., 11:45, 12:00, 12:45, 1:00 again
What if arrays started with 12? I bet Americans would love that!
arr[12]=fuck
arr[1]=this
arr[2]=shit
arr[3]=!!!14 -
1) read every pages of the tech's website
2) follow documentation
3) read online tutorials
4) try to use it in currently working some projects1 -
I just earned my first experience with a "MacBook Pro"..
1. Started in safe mode (reboot solved that)
2. Safari crashed..
I see what you mean with innovation.. NOT!3 -
1. Master react
2. Finish my grad thesis
3. Get a react dev job
p.s. Not necessarily in that order.1 -
HOW TO PROGRAM(in four easy steps) :
1. Google the F*cking Problem.
2. Open a Stackoverflow link.
3. Copy and paste the code.
4. If it didn't work, goto step 2.
If it did work, goto step 1
(you didn't think you were done.. did you?)
FAQ
Q: What if there is no code?
A: Then it is impossible.3 -
I hate it when people sort numbers in a drop down box like so:
[1, 10, 11, 12...19, 2, 20, 21...29, 3, 30, 31...]
This is just pure infuriating...5 -
Fuck android studio in the ass with cactus.
*starts learning Android*
*Builds simple application with 1 Button, 1 TextView and 1 EditText*
At this point, I haven't implied any logic or code in MainActivity.java.
*Hit Run*
*Gradle Build*
*Meanwhile, eat lunch*
*Still Gradle Build*
*After 2 Eternity, Build finished*
Fucking, slow peice of shit. I'm rebuiliding the App, because the AVD timedout while running.18 -
when code comments be like
# loop over the array
for i in 1...10
# divide by 2
x = i / 2
# return the result
return x4 -
How to kill a laptop in two steps:
1. Run React Native metro bundler
2. Run debugger
and a 16GB core i7 laptop on Ubuntu will leave this life :)2 -
1. Hits "Run" in Android Studio.
2. Goes to make coffee knowing Gradle will take a while to build.
3. Comes back after 30 minutes.
4."Select Device"
Fuuuuuuck!😠😠5 -
there it is, couting with: 2 instantes of VisualStudio, 3 of chrome, 1 of firefox, 1 of gvim, 1 of notepad.exe, 1 of Spotify and 2 real notepads in the desk.
2 projects, 4 databases and 1 deadline tomorrow 😂.
man, the 2 monitor setup really helps, when you can, go get one for yourself.3 -
So two guys at the company I work for just quitted, We were 4 in the "dev" department, 2 front end and 2 back end, now we're just 1 front and 1 back, should I try to get a raise?? I've been working steady for 8 months now.4
-
Picture a small product team, the dev side of it has 1 tech lead, 1 recently promoted senior dev, 1 junior dev.
1 - Offer your tech lead a severance package
2 - Hire a mid-level and a junior dev
3 - Give the product lead role to someone in their mid-20s that has no tech or project management background
4 - ???
The next 6 months are going to be interesting ones...3 -
1. Post a question on stack overflow
2. No one answers
3. Think yourself -- Is it tough / unsolvable / dumb ?
No low hanging fruits in life4 -
How we click notifs in devRant.
1-1. SOMEONE mentioned you in a comment!
1-2. SOMEONE commented on your rant!
2. SOMEONE ++'d your rant!
.
.
.
.
.
.
.
.
999. SOMEONE ++'d your comment!
1000. One (or more) new comments on a rant/collab you commented on!
Sorry creators, but..... (silence, drops mic)1 -
Customer: We wanna add this thing to that feature. It has to go live with the next deployment (1 1/2 weeks to go)
Me estimating developmenttime, and informing the Management
management: this will take approx. 12h to implement, but we need these informations: [long list of not answered questions]
1 week later (1/2 week left till deployment
customer: okay, lets do it
management: we dont have much time left, what about the questions i sent you?
1 Day no response, 1 1/2 days left until deployment
customer: here you have a few answers. couldnt get the others. ill Send them tomorrow
damn... wtf? guys! i need this shit to Stay in time! cant wait another day! hell no! -
In my classes whatsapp group
*posts a ppt*
person 1:how do I open it?
person 2:use adobe reader
me:*bangs head in the wall*1 -
In a lecture hall
1. Try Listening to lecture
2. Finds it uninteresting
3. Think that you can later learn from video tutorials
4. One day before exam -- No time to learn..3 -
Come up with a bad version of flipping a bool's value. (value = !value)
I'll start with a bad way of doing it in C# (.NET):
char[] bca = boolWert.ToString();
if (bca.Length == 4 && bca[0] == 't' && bca[1] == 'r' && bca[2] == 'u' && bca[3] == 'e')
{
boolWert = !bool.Parse($"{bca[0]}{bca[1]}{bca[2]}{bca[3]}");
}
else if (bca.Length == 5 && bca[0] == 'f' && bca[1] == 'a' && bca[2] == 'l' && bca[3] == 's' && bca[4] == 'e')
{
boolWert = !bool.Parse($"{bca[0]}{bca[1]}{bca[2]}{bca[3]}{bca[4]}");
}
else throw new Exception("y e s");4 -
1.
Never programmed something useful because i have no ideas...
2.
Never used comments in my projects6 -
Tomorrow I'll finally start working on a new part of my company's current project from scratch after loads of frustration in the past 1 1/2 months! Not a rant, just a lil bit of hope that it'll get better :)4
-
fuck off with the “do x in y lines of python code” it’s getting so goddamn annoying. yes python is concise. yes libraries do everything. you don’t need to show off someone else’s work with clickbait.
everything is like
“make a web server in 2 lines of python code”
import http.server
server = http.server.serve()
“mine bitcoin in 2 lines of python code”
import bitcoinminer
bitcoinminer.mine()
“do crazy math with 4 lines of python code”
import complex
import numpy
num1 = 1
num2 = 1
num3 = complex.addVectorMagnitudes(num1, num2)9 -
1. Started in Graphic Design and now able to bring my designs to full products.
2. Gives me a sense of progression.
3. Don't have to be charismatic.1 -
Why the fuck someone uses ‘2’ instead of “to” in the C code, for naming. What are you, a child?. I have even seen “cache12store” meaning cache 1 to store...5
-
Random code review:
contractor changes 2 lines in the .gitignore and 1 line in the composer.json and logs 4.5h against the related ticket .. hmmm2 -
1. Fix climate change and the environment in general
2. End corporate coercion and social inequality
3. Cure all mental illnesses
Is that too much to ask for?29 -
While I was exploring multiplication tables I stumbled on something cool.
Take any power of 2 on the multiplication chart.
Now look at the number in the bottom left adjacent box.
The difference of these two numbers will always be a Mersenne number.
Go ahead. Starting on the 2's column of a multiplication table, look in the bottom left of each power of 2 and get the difference.
2-2 = 0
4-3= 1
8-5 = 3
16-9=7
32-17=15
etc.
While the online journal of integer sequences lists a lot of forumlas, I just wrote what came to mind (I'm sure its already known):
((2**i)-(((2**i)/2)+1))
The interesting thing about this is it generates not only the Mersenne numbers, but if you run i *backwards* it generates *additional* numbers.
So its a superset of mersenne numbers.
at i = 0 we get -0.5
i=-1 -> -0.75
i=-2 -> -0.875
i=-3 -> -0.9375
i=-4 -> -0.96875
And while this sequence is *not* mersenne numbers, mersenne numbers *are* in this set.
Just a curious discovery is all.10 -
#!/bin/bash
while :; do
ps -ef | grep -iq [s]ymantec && for i in `ps -ef | grep -i [s]ymantec | awk '{ print $2 }'`; do sudo kill -9 $i; done
sleep 1
done9 -
2 in 1 Rant: When your deployment process isn't automated and consists of copying and pasting between servers (1) and the "implementer" of this "deployment" STILL messes up the copying and pasting (2). How?!2
-
Best explanation of callback from Stackoverflow:
Guy 1 to Guy 2: Hey dude I wanna do something when a user clicks in there, call me back when that's happens alright?
Guy 2 calls back Guy 1 when a user clicks here -
// Task: add one to the input number
// Sane people:
// print(int(input())+1)
// Me:
n = [*(reversed(bin(int(input()))[2:]))]
tmp = ""
for i in range(len(n)):
tmp = n[i]
tmp = "1" if tmp == "0" else "0"
n[i] = tmp
if tmp == "1":break
if tmp == "0":n+=["1"]
n = "".join(reversed(n))
n = int(n,2)
print(n)7 -
Dear Dark Side #1
Reformat code in all files
Push changes with commit message "Major changes."
Log 2 hours -
How to make habits for commitment:
1.Download Snapchat
2.Follow a girl in Snapchat
3.Try to make a snap when she does
4.Change from Snapchat to Git -
In the before times of 2019, one of the guys in the office had this habit of sucking his teeth after lunch.
I can hardly describe it. Imagine making kissy sounds but with your tongue and teeth. Did this almost every day from 1-2.
Probably happened every 1-2 minutes. So just long enough to get back into the swing and boom *thick*.
I just invested in some really nice headphones eventually.2 -
Wasted 2 days working on an obj (3d model) exporter….messed up meshes … missing faces … despair build after build …
And then the realization: Vertices in obj are 1-indexed.
…
..
.
FUCK
nobody learned anything from the array start at 1 meme2 -
When you have a Database Theory final exam in 2 hours and you're cramming a 1/4 of the module. #uni #student
-
1. Exporting fat jar
2. Transferring to cluster using WinSCP
3. Running it in the cluster.
4. Find a small bug.
5. Repeat
I HATE IT1 -
Incident 0:
1. Saw an interesting job opening
2. Sent the resume
3. Received an email mentioning not qualified.
Incident 1:
1. Saw an interesting job opening
2. Sent the resume
3. Hr scheduled an interview
4. Interview went good
5. Havent heard any thing ftom hr yet, neither positive nor negative.
I hope I dont need to mention the countries in both cases.4 -
Today's conversation in our odc
Person 1: Jenkins Down
Person 2: YouTube or Facebook
Person 1: No... Twitter
Person 2: Gud it means you guys are not blocked...
Awesome troll...
😂 😂 😂 -
Question - is this meaningful or is this retarded?
if
2*3 = 6
2*2 = 4
2*1 = 2
2*0 = 0
2*-1 = -2
then why doesnt this work?
6/3 = 2
6/2 = 3
6/1 = 6
6/0 = 0
6/-1 = -6
if n/0 is forbidden and 1/n returns the inverse of n, why shouldn't zero be its own inverse?
If we're talking "0" as in an infinitely precise definition of zero, then 1/n (where n is arbitrarily close to 0), then the result is an arbitrarily large answer, close to infinite, because any floating point number beneath zero (like an infinitely precise approximation of zero) when inverted, produces a number equal to or greater than 1.
If the multiplicative identity, 1, covers the entire set of integers, then why shouldn't division by zero be the inverse of the multiplicative identity, excluding the entire set? It ONLY returns 0, while anything n*1 ONLY returns n.
This puts even the multiplicative identity in the set covered by its inverse.
Ergo, division by zero produces either 0 or infinity. When theres an infinity in an formula, it sometimes indicates theres been
some misunderstanding or the system isn't fully understood. The simpler approach here would be to say therefore the answer is
not infinity, but zero. Now 'simpler' doesn't always mean "correct", only more elegant.
But if we represent the result of a division as BOTH an integer and mantissa
component, e.x
1.234567 or 0.1234567,
i.e. a float, we can say the integer component is the quotient, and the mantissa
is the remainder.
Logically it makes sense then that division by zero is equivalent to taking the numerator, and leaving it "undistributed".
I.e. shunting it to the remainder, and leaving the quotient as zero.
If we treat this as equivalent of an inversion, we can effectively represent the quotient from denominators of n/0 as 1/n
Meaning even 1/0 has a representation, it just happens to be 0.000...
Therefore
(n * (n/0)) = 1
the multiplicative identity
because
(n* (n/0)) == (n * ( 1/n ))
People who math. Is this a yea or nay in your book?25 -
Made an order for 3 bubble teas + 1 vacuum from Amazon. Somehow they came all in 1 tall box...
I thought they'd be in 2 packages since they were in different departments but I'm wondering what the layout of Amazon warehouses are and who/what decides that all these things can fit in one box...9 -
- have a look at the project
- brake it down into smaller stories
- estimate the time
- multipy it with 1.5
- add 1-3 days of testing
- add 15% project management
- add a 2 days buffer
= be happy with being done in 2 weeks, present it in 4 -
My goals are:
1. Start my new job in Feb.
2. Overcome the challenges I will face in the new environment.
3. Learn, learn, learn
4. Don’t forget to rest.1 -
#1 Speaking to my boss in Klingon.
He thought I was shouting at him in Dothraki.
lu' or luq
(yes, I will do that)
#2 Listening to Black Sabbath during a server compile 2.6h.4 -
Software development lifecycle:
Step 1: Take shortcuts to get the project done in time.
Step 2: Wait for shit to hit the you know what
Step 3: Goto Step 14 -
Finishing the whole front end for a pretty big site in 2 hours with 2 people and only 1 knows HTML and CSS2
-
Just curious.
1. How you hosting at deep web?
2. Can your websites become listed in deep web? Why?
I just curious12 -
1. Registering in Stack Overflow
2. Registering in DevRant
3. Thinking my code will run without problem -
1. Putting bits in proper places is fun
2. It's cool to translate curiosity and caffeine into money
3. Coding is modern-day magic in many ways -
How to kill Jira Backlog in one simple step:
1) put '-∞' to Storypoints
2) enjoy
(Bottom line: it can be fixed from User Story Map to something normal) -
// Posting this as a standalone rant because I've written the best piece of code ever.
// Inspired by https://devrant.com/rants/1493042/... , here's one way to get to number 50. Written in C# (no, not Do diesis).
int x = 1;
int y = x + 1;
int z = y + 1;
int a = z + 1;
int b = a + 1;
int c = b + 1;
int d = c + 1;
int e = d + 1;
int f = e + 1;
int g = f + 1;
int h = g + 1;
int i = h + 1;
int j = i + 1;
int k = j + 1;
int l = k + 1;
int m = l + 1;
int n = m + 1;
int o = n + 1;
int p = o + 1;
int q = p + 1;
int r = q + 1;
int s = r + 1;
int t = s + 1;
int u = t + 1;
int v = u + 1;
int w = v * 2 * -1; // -50
w = w + (w * -1 / 2); // -25
w = w * -1 * 2; // 50
int addition = x+y+z+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v;
addition = addition * 2;
if (addition == w)
{
int result = addition + w - addition;
Console.Writeline(result * 1 / 1 + 1 - 1);
}
else
{
char[] error = new char[22];
error[0] = 'O';
error[1] = 'h';
error[2] = ' ';
error[3] = 's';
error[4] = 'h';
error[5] = 'i';
error[6] = 't';
error[7] = ' ';
error[8] = 'u';
error[9] = ' ';
error[10] = 'f';
error[11] = 'u';
error[12] = 'c';
error[13] = 'k';
error[14] = 'e';
error[15] = 'd';
error[16] = ' ';
error[17] = 'u';
error[18] = 'p';
error[19] = ' ';
error[20] = 'm';
error[21] = '8';
string error2 = "";
for (int error3 = 0; error3 < error.Length; error3++;)
{
error2 += error[error3];
}
Console.Writeline(error2);
}5 -
Tonight's checklist:
1. Study a chapter in ISLR
2. Try to understand source code of an open source project in GoLang.
3. Complete programming challenges on HackerRank
What I am going to end up doing:
1. Watching videos of The Rock trolling others.
2. Watch Family Guy2 -
Once upon a time i have seen a block of code in a while (2 > 1) ... it was in C (or so i remember), but still...2
-
There is only one way of boiling spagetti (code)
1.Measure your required amount of spagetti (in project)
2.Wrong1 -
TIL that in JavaScript [1, 2, ] gives you a 2 elements array, while [, 1, 2] gives you a 3 elements array
WTF JavaScript???7 -
Linux networking: A tragedy in three acts
ACT 1:
Wherein the system administrator writes their /etc/network/interfaces file as is the custom.
ACT 2:
Wherein the kafkaesque outputs of basic networking commands threaten basic sanity. Behold:
```
# ifup ens3:1
RTNETLINK answers: File exists
Failed to bring up ens3:1.
# ifdown ens3:1
ifdown: interface ens3:1 not configured
```
ACT 3:
Wherein all sanity is lost:
(╯°□°)╯︵ ┻━┻)1 -
Allowing only 1-2 chosen apps to use mobile internet while being run in user-space (as in you see the shit and are able to close it via a swipe) would be sick..
-
Rule 1: You are the best programmer.
Rule 2: Others are acting to be good programmers or are in a fixed match.2 -
#1 hand in my notice
#2 start my own company
#3 enjoy work
#4 make a metric shit-ton of money (contributes to previous point)2 -
I'm thankful I have 2 ISPs in my area so I can at least threaten to switch although one only offers 1/10 the speed of the other.3
-
Starting.
Because you build the same boilerplate over and over again.
People recommending me shit I didn't ask for in 3...2...1... -
wHo WrItEs OnLiNe LiKe ThIs?
ALSO THE UNIT MADE A REPLACEMENT CLASS IN THE TIMETABLE WHICH MEANS ALL OTHER UNIT CLASSES OR SLOTS CANNOT GO IN THERE FOR THE WHOLE SEMESTER, JUST FOR 1 WEEK!!!!
1 CLASS IN 1 TIMESLOT IN 1 WEEK FOR 2 HOURS IS RUINING MY WHOLE TIMETABLE3 -
Multi-rant incoming!
1.
Stereotyping.
When did that shit become the norm?
2.
I'm lost in ROS smach. Does anyone do multi-threading in ROS services, or should I flip a table on smach? 😒11 -
heres something interesting:
The golden ratio is 1.618...
If you're not familiar with it, doing 1/goldenratio
the result is 0.618...
It gives you back the float component exactly.
Discovered that it is actually part of a series.
First of all:
2-(((5-sqrt(5))/2)-1) =
1.618033988749895 -> thats our golden ratio
In other words:
(2%gold) =
0.381966011250106
While:
((5-sqrt(5))/2) =
1.381966011250105
Ok, now we're getting somewhere. We can turn these into variables
First of all, lets see if we can get the golden ratio back out:
2-(((5-sqrt(5))/2)-1) = 1.618033988749895
Okay good.
The formula looks something like
j-(((i-sqrt(i))/2)-1)
Where j = (i*2)+1
That means we can easily figure out what j we need from our i value. (i-1)/2 = j
We run it back far enough we get
1-(((3-sqrt(3))/2)-1) =
1.3660254037844386
Thats the golden ratios little brother. Doesn't look anything like it, but it is part of the series.
And I found a boat load of research documents scattered *all* over the net, where this number and others in the series inexplicably crop up in power series, in chemistry, and elsewhere. Just looks like random floats if you don't know better.
We can actually go lower in the series:
0.5-(((2-sqrt(2))/2)-1)
1.2071067811865475
At the lowest positive value for j, we get
0-(((1-sqrt(1))/2)-1) = 1
It's kinda elegant.
I even wrote a little script to do the conversions:
def gr(k):
....i = k
....j = (i-1)/2
....return j-(((i-sqrt(abs(i)))/2)-1)
The dots are so devrant doesn't break pythons formatting.3 -
It's my first rant. So please ++1 me.
Now my rant:
In this semester I had a subject about system architecture. In this class, we must learn Java script, C# (and ASP.NET framework ), PHP (and Zend Framework 2), but in the classes is taught only UML and patterns. In the moodle of the subject we don't have any information about any of the languages and if we ask the teachers they don't know anything.
And we need in 4 weeks do a work with a widget in javascript, 2 Asp.net mvc, 1 asp.net web api. All with authentication.
So we are all fucked10 -
Had a university project with friends, got another guy (#1) in our team. Upon being asked if we would take yet another guy (#2), we were sceptical if he was a good developer... Turned out guy #2 is one of the best of us, guy #1 can't do shit.
-
*Formats hard drive without backing up important files*
*plays in the background*
https://soundcloud.com/matthew-sill...4 -
I didn't realise just how retarded people are when they call tech support.
Working combined line 1/2 tech support and people just describe shit in the most unhelpful way ever.2 -
Have 1 urgent, 2 very urgent and 1 super very urgent task at the same time, and 3 man arguing in the back of my chair which one should I do first.
Me: waiting and working the some little cosmetic for the next sprint1 -
There are only 2 hard problems in software:
1. Naming things
2. Cache invalidation
3. Off by 1 errors3 -
// Hairy ass complex logic
if(1 == 2) { ... }
If only the programming language had a built-in syntax for commenting out code, you fucking cumdumpster idiot.1 -
In no particular order:
1. Sense of accomplishment.
2. Keeping my brain busy.
3. Working with smart people. -
2 things that piss me off as a professional developer doing contract work...
1. A fellow dev accepts a meeting invite, doesn’t show up and won’t pick up the phone.
2. A fellow dev taking a meeting in a noisy place with bad wifi.
This guy has now managed to pull #1 last week and #2 this week... -
Quad Booting my laptop with Manjaro-KDE . Let's see how this one turns out.
This is my third Linux distro after Ubuntu and Fedora.
Been using Ubuntu from past 2 years.
Hoping to move on to Arch in next 6 months if I like Manjaro
Currently I have 1 Windows, 1 Ubuntu, 1 Kubuntu and now a Manjaro2 -
I code for 2 1/2 days straight, I'm in the zone, no comments, because I'm not in some comp sci beginners class, finish up, test it the only problem is with... All of it... Just considering writing another program to comb through that one and find the mistakes for me3
-
Biggest dev ambition:
Be good enough to:
1. Get featured: press or App Store
2. Win Grand Prize in Google Code-In (trip to Google HQ)
3. Win WWDC scholarship3 -
Work log..
Day 1
1) Starts a new project.
2) Can't connect windows machine to the new router.
3) Wastes one day connecting.
Day 2
1) Switched to Linux (dual boot).
2) Parrot OS sound issue, don't know why.
3) Fixed the issue, upgraded the system. No brain fucked.
4) Sets up Dev Environment, Starts the project.
5) All this in 4 hrs.
#DumbWndows
Now, I'm staying here. #LoveLinux2 -
Ok so as the only developer in a tech startup who is mostly self-taught i've decided to take the initiation and do some online certificates and diplomas
bagged 2 now
1 Python programming
2 Business frameworks and IT for Orgs2 -
Probably pure coincidence but if you look at the deconstruction of the dedekinds like so:
>>> decon(6)
offset: 1, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('1')]]
>>> decon(20)
offset: 2, exp: [[Decimal('2'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: []
>>> decon(168)
offset: 3, exp: [[Decimal('2'), Decimal('2')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('2')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('2'), Decimal('3')]]
>>> decon(7581)
offset: 4, exp: [[Decimal('2'), Decimal('3')], [Decimal('5'), Decimal('3')], [Decimal('7'), Decimal('1')]]
offset: 3, exp: [[Decimal('2'), Decimal('2')], [Decimal('5'), Decimal('3')]]
offset: 2, exp: [[Decimal('2'), Decimal('4')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: []
>>> decon(7828354)
offset: 7, exp: [[Decimal('2'), Decimal('6')], [Decimal('5'), Decimal('6')], [Decimal('7'), Decimal('1')]]
offset: 6, exp: [[Decimal('2'), Decimal('8')], [Decimal('5'), Decimal('5')]]
offset: 5, exp: [[Decimal('2'), Decimal('5')], [Decimal('5'), Decimal('4')]]
offset: 4, exp: [[Decimal('2'), Decimal('6')], [Decimal('5'), Decimal('3')]]
offset: 3, exp: [[Decimal('2'), Decimal('2')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 1, exp: [[Decimal('2'), Decimal('2')]]
>>> decon(d('2414682040998'))
offset: 13, exp: [[Decimal('2'), Decimal('13')], [Decimal('5'), Decimal('12')]]
offset: 12, exp: [[Decimal('2'), Decimal('13')], [Decimal('5'), Decimal('11')]]
offset: 11, exp: [[Decimal('2'), Decimal('10')], [Decimal('5'), Decimal('10')]]
offset: 10, exp: [[Decimal('2'), Decimal('11')], [Decimal('5'), Decimal('9')]]
offset: 9, exp: [[Decimal('2'), Decimal('9')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('8')]]
offset: 8, exp: [[Decimal('2'), Decimal('10')], [Decimal('5'), Decimal('7')]]
offset: 7, exp: [[Decimal('2'), Decimal('7')], [Decimal('5'), Decimal('6')]]
offset: 6, exp: []
offset: 5, exp: [[Decimal('2'), Decimal('6')], [Decimal('5'), Decimal('4')]]
offset: 4, exp: []
offset: 3, exp: [[Decimal('2'), Decimal('2')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('2'), Decimal('3')]]
the powers in the 2's column go:
1, 2, 2, 2, 3, 3, 2, 4, 6
which are predicted by:
https://oeis.org/search/...
Again, probably only a coincidence, but kinda beautiful.2 -
1. Get that senior-appropriate raise
2. Build a real ML project
3. Learn web assembly and get to the next level in web dev -
Today's achievement: wrote game of life in K3.
neigh:{(+/,/-1 0 1!'\:/:-1 0 1!\:x)-x}
life:{(x*2=neigh x)|3=neigh x}15 -
My thoughts right now:
1. If waifus exist (Alice lol), where are all the husbandus?
2. I want a cheeseburger
3. The picture. My brain in a test.9 -
Just search 'mascleta, valencia' in youtube. I was working in a building near that. From day 1 to day 19 of March, every single day at 2:00 PM
-
So in Ruby, everything is passed to functions by value. However, when you manipulate objects, you're actually manipulating references. A simple example:
```
a = [3]
b = a
c = a
b.push(2)
print a
print b
print c
# => [3, 2][3, 2][3, 2]
```
Here's a more complicated example from the problem I was solving:
```
table = Array.new(5) { Array.new() }
1.upto(5 - 1) do |i|
1.upto(5 - 1) do |j|
table[i] = table[j]
end
table[i] << rand(1..6)
end
```
I have been running around in circles this morning because I forgot that. This makes C++ for example, more clear than Ruby since C++ explicitly shows the intent to the programmer.5 -
$git commit -m "fix fucking bug again"
$git push
fatal: Right now you can only push 1 commit every 2 rants (every 1 rant for gitRant++ members) because we want to make sure everyone's commit are pushed in a relaxed state of mind! 2 rants to go until you can push another commit.7 -
I recently bought 2 google home. 1 placed in living room, and 1 in our bedroom.
That weird feeling of being spied makes me can't have sex like normal again o_O, sometimes i like to cover her face with pillows 🤣18 -
Story of my life:
1. Complete project to 90+%
2. Add that "one last feature"
3. Hit unresolved bug buried deep in one of the project's core requirements. -
Following on from my thread where I got wrecked for being brain damaged, and posting about dividing by zero, it is time for round two!
Lightening round: Electric boogaloo!
Episode 3: "Glutton for punishment"
You can read that thread here if you like or skip over.
https://devrant.com/rants/4931841/...
Can we divide by zero? Is there some representation where thats the case? And what are the implications if we can?
In this round Devranters, you will be challenged to determine if OP is 1. insane, 2. a genius, 3. high on mushrooms. One contestant will be eliminated. The winning team will get a bag of rice and sunscreen, while the other team will have to vote to send someone home from the island.
Get ready.
Heres the full rant because DR wouldn't post it for some reason:
https://pastebin.com/qBg80ujN42 -
did on my last project:
1 .Using QA env as dev env
2. Deploy in production not completely tested stuff (90% tested)
3. Run with errors in prod
4. Manual fix in prod
5. Git versioning1 -
Me: *What* is the process to do X in this environment? The link is not working. (Link available in only application 1)
Senior colleague: Through which application?
Me: *Mentions the full name of application 1*. Application 2 works as well.
SC: Yeah it can be done by application 2 as well.
Me: *waits*
*Okay, TELL ME FUCKING HOW!!! I asked for the process, not about its possibility.* -
After 4 1/2 hours of testing I have redeployed my postgresql database from Windows to Debian Server. I can now access my database and deploy webapps from any computer, anywhere, anytime.
It's 2:30 AM in the morning. I am exhausted but fulfilled.1 -
Saw the following SQL in an SP at work:
Type_ID = CASE Product.Type_ID
WHEN 1 THEN 1
WHEN 2 THEN 1
WHEN 3 THEN 2
WHEN 4 THEN 3
END
Seems a little bit redundant to me :-)...1 -
Settling with the fact that you will start with 15-20 game changing ideas, but in the last will complete only 1-2(read 0)
-
Not nice, Plug… not nice! You define a Plug Module with 2 functions (init/1 & call/2) and the result of init/1 is passed in as the second argument of call/2… but init/1 is executed in compile time and call/2 in runtime.
WHY?!?!
I can't think of any other behavior that… well… behaves that way!
It's not even in the official docs (¬_¬)1 -
heres a new constant found this morning
>>> (1.39094974939078**(pi-0.5))-1.39094974939078
==
0.9999999999999867
the following..
>>> 1.39094974939078**2
1.934741205330274 +/- 1
and
((1.39094974939078**(pi-0)))
2.8198510518716056 +0/+1/+1
show up in things as varied as the density of galaxies, gasoline chemistry, traffic accident formulas, and more.
Kinda cool.31 -
Count the number of keyboards in your room (including musical keyboards).
1,.. 2,.. 3,.. 4,.. 5,.. 6,.. Damn, that is a lot.11 -
Time to learn how to write an MVC Windows Console App in C++ in just a few days while also having 1 presentation, 2 technical demos, and 4 exams this week...
-
Every once in a while I come across a challenge that's actually challenging. Most recently ... "Develop Regex for validating and extracting a recipe's ingredient's quantity"
Regex should properly identify the numbers in each of the following lines:
1 cup of ingredient
Diced 1/2 cup of ingredient
.5 tsp of ingredient
1 1/2 packed cup of ingredient
1.5 cup of Heavy whipping cream
My answer is the first comment in case you want to solve it yourself. I'd love to know what others come up with.5 -
Somebody write more and more ugly / incomprehensible lines of code for 1-2 beautiful line.
But the bug is always in ugly code.
I hate these programmers, I hate these programs!1 -
Wherein I disprove Goldbachs Conjecture (in one specific case)
golbach conjecture:
every even number is the sum of two primes
lets call the primes p and q
lets call our even number p+q=n
we can go further by establishing two additional variables
u=p-1, v=q-1
therefore every even number is the sum of u+v+2, according to goldbach's own reasoning.
in the simplest case...
p=2, q=2, p+q=4
u=1, v=1, u+v+2 = 4
We can therefore make a further conjecture in the simplest case every sum of two primes, less 2, is the sum of two composites. This likely has connections to the abc conjecture for a variety of reasons. But leaving ancillary discussion aside for a moment...
We can generalize to a statement that every even number is the sum of two odd numbers. And every odd number greater than 1 is the sum of an odd number and an even number.
Finding an even number that is not the sum of (p-1)+(q-1) would therefore be equivalent to disproving the goldbach conjecture. Likewise proving every even number is the sum of (p-1)+(q-1) would be the equivalent of proving it.
Proving all even numbers greater than 2 are the sum of two composites + 2 would be proof of goldbachs conjecture, and finding any example or an equation that proves an example exists such that *some* subset of even numbers are NOT the sum of two composites +2, would disprove the conjecture.
Lets start with a simple example:
2+2=4
because 4-2=2, and two is not the sum of two composite numbers goldbachs conjecture must ipso facto be false.
QED
If I've wildly misapprehended the math, please, somebody who is better at it, correct me.
Honestly if this is actually anything, I'd be floored to discover no one has stumbled on this line of reasoning before.8 -
Here's how my day went today:
1. Smoked weed after a 2 weeks break. Got high as shit.
2. Included cardio in my gym routine as an attempt to get over my exer-phobia.
3. Landed a client from the UK and negotiated a 15 GBP/hr contract working remotely in India.
How's yours going?2 -
I want your opinion about designing a web.
What is better for you?
1) A web page with 2 files (e.g. page1.html and page2.html), so the client must send a request for each content.
2) A web page with 1 file (e.g. page.html) with all the content in divs with 'display: none' and switch between them wth javascript.
Thanks!13 -
Some programming languages are sold because of being simple and straightforward. That could be true, but sometimes simple things as
1 + 1 = 2
becomes something we need to read a 600-page book in order to do so. :)5 -
This morning, I tried to abstract myself from my computer while trying to calculate sqrt(1.81).
I came up with what I thought to be a genius method. I tried to find B such as (1+B)^2=1.81. Then I ended up calculating the discriminant of 1+2B+B^2 and had 4*1.81. Sounded funny at first, but upon calculating the positive solution amongst the 2 possible ones, I ended up with (-2+2sqrt(1.81))/2 = ... sqrt(1.81)-1. Upon replacing in the initial equation, one gets (1+sqrt(1.81)-1)^2 = (sqrt(1.81))^2 = 1.81.
I'm sorry for having let you down, dear pasokon. Please forgive me.2 -
Angular 1.x V Angular 2 ! Which one do you prefer ?
Saw the enhancements in V.2 they are way off the initial base ...6 -
Developer 1: You know what they say, programming is just like sex.
Developer 2: Wait, what? I've never heard that before.
Developer 1: Yeah, you spend all your time trying to fix things that should never have happened in the first place.8 -
oh man 2 1/2 weeks completely away from programming, IT things and so on.. was in trouble and in a shitty mood, but finally im back. hell yeah feels good.
salute guys1 -
I feel a bit confused rigt now.
Did i misunderstand something with this random little excercise?
" Write a Java program to find the index of a value in a sorted array. If the value does not find return the index where it would be if it were inserted in order. Example:
[1, 2, 4, 5, 6] 5(target) -> 3(index)
[1, 2, 4, 5, 6] 0(target) -> 0(index)
[1, 2, 4, 5, 6] 7(target) -> 5(index) "
Here is what i did lol:
https://gist.github.com/laim2003/...
And here is the official solution:
https://gist.github.com/laim2003/...
Their solution seems a bit unnecessary complicated lol or am i wrong1 -
Just found out that something like this would actually work in Java:
int a = 2;
switch(a) {
case 1:
int b = 1;
break;
case 2:
b = 2;
}
I know about the variable scoping part, but that doesn't means if the language allows this kind of shitty code you should use it.. Fuck took me 15 mins to resolve the merge conflicts. As during merge the 1st case was partially removed. And the code was filled with these kinds of logic. This could have been done in a minute without the shitty code..4 -
1. Test coverage not consisting of flaky brittle tests
2. Native type checking in JS (v8 engine)
3. Less meetings.7 -
1. Enroll in course/project/tutorial
2. Watch, apply, ask questions, find answers and repeat until nothing left to learn
3. Reformat the machine I was learning from
4. Forgot what was learnt and repeat from step 1 until it becomes 2nd nature
5. ???
6. PROFIT (by doing jobs)!!! -
Just started feeling productive in angular 1...now angular 2 is here. Should I leave it all and move to angular 2 or keep learning and improving myself in angular 1?6
-
Databases and LDAP down since 1 1/2 days...so embarrassing...am i really working in an it company???
luckily there are options beside work...hello amazon, spotify, devrant...:D
if we got Server/DB issues it always takes about at least half a day to fix it! *facepalm*1 -
1. Brain feels like in motion without idle time. It's a very pleasurable feeling
2. Create things from scratch by myself
3. solving problems
Not all coding is like this, though. -
How many of us does these ?
1.Typing "Google".In Yahoo/Bing (if Google is not default),
2. Clicking on the first link.
3. And then typing our questions in Google.
I do this every time !!!2 -
DailyCodingProblem: #1
Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.
For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]. If our input was [3, 2, 1], the expected output would be [2, 3, 6].
this is my quickly solution in php:
$input_array = [1, 2, 3, 4, 5];
echo('INPUT ARRAY:');
print_r($input_array);
echo("<br/>");
foreach($input_array as $key => $value){
$works_input_array = $input_array;
unset($works_input_array[$key]);
$result[] = array_product($works_input_array);
}
echo('OUTPUT ARRAY:');
print_r($result);
outpout:
INPUT ARRAY:Array ( [0] => 3 [1] => 2 [2] => 1 )
OUTPUT ARRAY:Array ( [0] => 2 [1] => 3 [2] => 6 )5 -
1) Give my logical reasoning abilities to my clients and users.
2) Whenever there is a change in project requirements, I should get 24 karat 100 Gram gold coins.
3) Give me 2 more wishes.
4) My code should work as expected on first attempt.
5) Give me ability to learn new technology in just 1 day.3 -
I have a question regarding file redirects 2>&1 and 1>&2. I know that file descriptor 1 is std o/p and 2 is std error and that we're redirecting one file descriptor to another.
But why do we do it? What are their use cases? Wouldn't the file to which redirection is setup get too clunky?
Analysis of the file would also become a bit difficult. And wouldn't having errors stored in a separate file make it easier to interpret and fix them?8 -
1. Docs
2. Tutorials
3. Realize tutorials skipped a few details
4. Back to step 1
And in most cases, joining a slack/telegram group for the tech -
Question about conditioning my new android lithium battery.
I dont understand what's happening with my phone. Have old Xperia Z3 D6603 (running android 6.0 marshmallow).
Had problems with battery since it was not lasting even 5 minutes so bought a new battery from ebay and installed it yesterday.
So first time I put it to my phone it showed that it had 70% of charge. I've read in battery description that I have to discharge the battery and recharge 3 times.
First time I wanted to discharge from 70% to 1% and with a battery discharge app + youtube 1080p videos + wifi signal it took only around 1 hour and phone was at 1%. From 1% till complete discharge it took me extra hour and then phone died.
I plugged it to charge and after 15 minutes it showed that battery now is at 100% (which is insane, it should take 2-3hrs to charge it up to 100%). So I charget it for 2-3 hrs ignoring that it said 100% already.
I discharget it from 100% to 1% in 1 hour and now again phone is stuck at 1% and it took me 2 more hours to discharge phone until battery died completely.
I don't believe that this behaviour will fix itself. How can I fix this problem so that battery percentage would be distributed evenly? Now it drops from 100% to 1% in 1hr and then from 1% to 0% in 2 hrs.3 -
1. Where does it run
2. Who runs it
3. did i put every bit of email conversations about errors in my archive? -
my recents WTFs
1. Typo3 in general 2. Outlook ignoring „margin“ with a lower m ... capital M works fine.3 -
!rant: quick question re web app
Should I separate the admin side from user side?
(2 folders) or include both sides in one project(1 folder)?6 -
Let's have a poll.
Which theme do you prefer in a code editor/IDE?
1. White/Light colors.
2.Black/Dark colors.4 -
Question to all dev
1.Which programming language is in demand right now ?
2.And can you suggest me any beginner project ?7 -
So apparently in MySQL, 0 doesn’t always equal 0, sometimes it can be 1, or 2, or 3...
what the actual fuck?!?!5 -
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.. -
BSoDs/scenario I've had in 5 months:
Watching a video on VLC: 5
Chrome running normally: 2
Chrome running while waking up from sleep:3
Working on WSL: 2
Updating: 1
Seriously though. VLC? (╯°□°)╯6 -
Let me know your favorite apps in mac
My favorites
1.Textsniper
2.Toothfairy
3.alfred
4.multitouch
5.hookshot
6.dropover9 -
so... self-referential arrays.
do you know any languages that have them? thoughts?
what I mean is (in pseudo-c# syntax) :
string[] r = new string[]{ "1", "2", self[0] + " and " + self[1] };
which would result in an array with items:
1
2
1 and 29 -
Assumption. Screens are wider and wider, bigger and bigger.
Solution 1: Make more one-page layout sites like there is no space on sides.
Solution 2 support solution 1: Make everything 2-3 times bigger so there can't be space on sides.
Solution 3 support solution 2: If there is some free space, call it neccessary white space.
It's a trend i see around me. Sometimes i don't get it. More than 1 year i have no side menu in designes what i coded. -
I think I have a slight problem in my API.
Snapshot 1 : API entrey point
Snapshot 2 : on "return" statement from API.
No biggies, 8 GB of RAM used.
The API ? Adds 1 ligne in database.
That's gonna be a fun debug8 -
Do you have multiple screens? If yes, in what orientation?
I'm personally using 2. 1 horizontal and 1 vertical.
The vertical one is nice for long documentation and the horizontal one is mainly used for gaming.12 -
1. Finish the product I'm working on.
2. Finish the researches left in between because of the point one -
Version 1 of any software is full of bugs. Version 2 fixes all the bugs and is great. Version 3 adds all the things users ask for, but hides all the great stuff in Version 2.
;) -
In JavaScript there are two kind of persons:
1) var self = this;
2) function(){}.bind(this);
Do you recognize yourself?4 -
Heard while playing Clue:
Person 1: It was the Jamaican, with the spear, in the jungle.
Person 2: What Jamaican?
Person 1: Trouble... -
Best Linux distro for a 2-in-1 laptop that I also want to use as a tablet? Are there any that can run Android apps natively (like ChromeOS but not ChromeOS because I also wanna do dev)?2
-
Two dev things I use:
1. Phind — dev-oriented ChatGPT. Free. https://www.phind.com/search
2. DevDocs — all the docs for languages/popular libraries consolidated in one offline library. https://devdocs.io/ -
People hate on Python a lot. I just used the Python ternary operator for the first time. I found it easier to read than the C++ ternary operator:
0 if i==0 else 2 if i==segmentMax-1 else 1
vs
i==0 ? 0 : i==segmentMax-1 ? 2 : 1
I think Python did a good job in this case.18 -
whenever I see the word TypeScript I actually read JavaScript. Cuz it's really JavaScript in disguise. Its type system is JavaScript worthy, maybe... Probably not
edit:
viscoders raging in 1, 2, 3..4 -
Excel die you motherfucker die
1) Allow Ctrl + A and other shortcuts in formulas
2) Stop throwing an error requiring closing a window every fucking time I want to cancel writing a formula, and then another window after the first 1 -
There are two types of developers in the world.
Type 1:
if(isLoggedIn) {
}
Type 2:
if(isLoggedIn)
{
}
Be in Type 1, you can't save world but at least you can save one line in file.2 -
How many monitors do you need and how do you use them?
I have three monitors at work, I used to have 2 in portrait and one landscape in the middle, during the last months I switched to the opposite (2 landscape and 1 portrait)
In my home I use 2 1080p displays landscape20 -
Achieved a 2:2 in computer science and graduating (got interviews with for some jobs). I have some sits in some modules, which could change my grade to a 2:1.
From a company point of view, is it worth going for the 2:1? Will it open more jobs / better salary straight away? Or shall I go for the first job offered with the 2:2 I got.7 -
Give me a full 1-2 weeks of work for the project and then i relate it to how big the project seems in comparison to previous projects 😄
-
Idiots in my team
1) Fullstack : ask's way too many questions.
2) Tech manager - knows nothing about management
3) backend : assumes he know's everything and when asked says he know's nothing -
Did 2 leetcode today (technically 1)
https://leetcode.com/problems/...
idea:
* Palindrome means cut it half, rearrange the other half, will equal each other.
* Using javascript new map() to build a hash map
* Loop the hash, add up quotient*2, add up remainder.
* if remainder > 1, then return_sum+1
https://leetcode.com/problems/...
seen a few times in interview.
* do the big one first, i.e. if(n % (3*5) === 0)
* then n%3 === 0
* then n%5 === 01 -
.com domains used to be like $1 or $2 a year during the pandemic now they’re $6 and the price will go up in September :(2
-
1. Stack Overflow
2. Match in FIFA / few rounds in Tekken
3. Beer / Cigarette break (do it only if nothing really helped) 😁 -
1. More experience in programming to reach the next level!
2. A job in the USA!
3. Will leave it for a complicated bug to wish it be fixed lol4 -
My new year resolution as a dev:
1. Competing in Kaggle competitions
2. Motivate peoples in data science
3. Do some cool project
4. Waiting for devRant stickers.. -
The WiFi/Bluetooth chip in my SP3 died. Now I have to plug in this stupid adapter in my only USB port. So, that being said...
Ranters, best 2-in-1 convertible laptop, go!5 -
1) own work hours.
2) good salary.
3) programming is fun.
and most of all.
we can make an impact in other peoples life. -
I want to print the first number in the Fibonacci sequence to contain over 1000 digits. I got fibbonaci to work but I cannot seem to figure out how to implement the "Contain over 1000 digits".
Do I make a list to store the fibbonaci numbers in then do a statement?
My Python 3 Code:
def fibonacci(num):
if num == 2 or num ==1:
return 1
return sum([fibonacci(num - 2), fibonacci(num - 1)])
print(fibonacci(7))7 -
Hey guys again I have question for you please help me🙏
1)Abstraction method use in python pgm
2) super keyword used and modify the code for inheritance kilometres pgm13 -
Running npx google-artifactregistry-auth in three simple steps:
1. Run npx google-artifactregistry-auth
2. Interrupt the process because it will inevitably get stuck on retrieving credentials
3. Run npx google-artifactregistry-auth
Then to install packages you need just 3 simple steps!
1. Run npm i
2. Interrupt when it gets stuck on reify
3. Run npm i3 -
Bring in your A game everyday
Part 1
https://youtu.be/GvAnTKd1OUg
Part 2
https://youtu.be/hgldnq8AYiA
The most impactful video I ever watched. -
I want to create an app with usertype 1 and usertype 2 in which both should have separate login forum but in single app and whatever usertype 2 posts,usertype 1 should be able to see in their news feed and should be able to response. People are telling me you should create separate app for each usertype but i don't like that idea.....Help me guys if anybody know what should i do.1