Details
-
Aboutscript kiddo
-
Skillsmostly frontend
-
LocationKing George
-
Github
Joined devRant on 4/16/2017
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
-
#include <time.h>
char*w = "AAAA########+++///9999AA Good %s!\n\0Morning\0Day\0Afternoon\0Evening\0Night";
int main(){time_t t=time(0);return printf(w+25, w+w[localtime(&t)->tm_hour]);}
//bisqwit's code8 -
I've just used https://gtmetrix.com to see how devRant fares. Pretty well actually, with one major gotcha that should be easy to fix. There are a lot of static resources without browser cache expiration date.
A little image optimisation could also be done, see the PageSpeed tab. And scaling down images in CSS could also be replaced by proper scaling of the image itself.
The YSlow tab shows that a little JS minification is missing, and maybe 4 external scripts could be combined into one.1 -
I love the fact in Linux that you can put fortune | cowsay every time you start a new terminal session22
-
I thought it would be pretty cool to start a pet-sharing post!
(My apologies if this has been done before, I just thought it would be cool to see the pets of the devRant community!)
Here are my two:69 -
Our current designer is convinced that 00FF44 bright green fits well with the rest of our soft purple/blue color scheme.
I am not a designer, but have worked in a color laboratory, so I've tried time and time again to explain CIE LAB color space, and how at least HCL is a good way to pick & group colors into palettes by using 2-3 luminances for equidistant hues while keeping chroma constant.
I've tried to tell him that the bright green almost physically makes my eyes bleed, because humans are quite sensitive to greens.
He just keeps using the phrase "but it makes the buttons pop nicely".
I just want to pop his skull open with my keyboard. 😫11 -
I recently had the problem with my Galaxy S8 that my camera won't focus. Searched for solution. Found one which said: "Just hit the side of your phone when the camera is on."
Problem fixed, camera focuses again.
I like this kind of problem fixing.2 -
I've just found an awesome repo:
https://github.com/tldr-pages/tldr
There is soooo much great stuff in there! Lots and lots of commands with some quick examples, much clearer than having to look through cryptic manpages and SO replies.
I literally just understood in 30 seconds how git stash and cherry-pick work thanks to those examples - something I struggled to wrap my head around from the --help manual
This is awesome!6 -
Best way to learn a subject/skill is to build projects. How about building your own computer from scratch to learn how computers work.
https://eater.net/8bit/ this tutorial teaches you to build an 8-bit computer from scratch 😍 -
Today, I learned the shortest command which will determine if a ping from your machine can reach the Internet:
ping 1.1
This parses as 1.0.0.1, which thanks to Cloudflare, is now the IP address of an Internet-facing machine which responds to ICMP pings.
Oh, you can also use this trick to parse 10.0.0.x from `10.x` or 127.0.0.1 from `127.1`. It's just like IPv6's :: notation, except less explicit.8 -
As a developer, sometimes you hammer away on some useless solo side project for a few weeks. Maybe a small game, a web interface for your home-built storage server, or an app to turn your living room lights on an off.
I often see these posts and graphs here about motivation, about a desire to conceive perfection. You want to create a self-hosted Spotify clone "but better", or you set out to make the best todo app for iOS ever written.
These rants and memes often highlight how you start with this incredible drive, how your code is perfectly clean when you begin. Then it all oscillates between states of panic and surprise, sweat, tears and euphoria, an end in a disillusioned stare at the tangled mess you created, to gather dust forever in some private repository.
Writing a physics engine from scratch was harder than you expected. You needed a lot of ugly code to get your admin panel working in Safari. Some other shiny idea came along, and you decided to bite, even though you feel a burning guilt about the ever growing pile of unfinished failures.
All I want to say is:
No time was lost.
This is how senior developers are born. You strengthen your brain, the calluses on your mind provide you with perseverance to solve problems. Even if (no, *especially* if) you gave up on your project.
Eventually, giving up is good, it's a sign of wisdom an flexibility to focus on the broader domain again.
One of the things I love about failures is how varied they tend to be, how they force you to start seeing overarching patterns.
You don't notice the things you take back from your failures, they slip back sticking to you, undetected.
You get intuitions for strengths and weaknesses in patterns. Whenever you're matching two sparse ordered indexed lists, there's this corner of your brain lighting up on how to do it efficiently. You realize it's not the ORMs which suck, it's the fundamental object-relational impedance mismatch existing in all languages which causes problems, and you feel your fingers tingling whenever you encounter its effects in the future, ready to dive in ever so slightly deeper.
You notice you can suddenly solve completely abstract data problems using the pathfinding logic from your failed game. You realize you can use vector calculations from your physics engine to compare similarities in psychological behavior. You never understood trigonometry in high school, but while building a a deficient robotic Arduino abomination it suddenly started making sense.
You're building intuitions, continuously. These intuitions are grooves which become deeper each time you encounter fundamental patterns. The more variation in environments and topics you expose yourself to, the more permanent these associations become.
Failure is inconsequential, failure even deserves respect, failure builds intuition about patterns. Every single epiphany about similarity in patterns is an incredible victory.
Please, for the love of code...
Start and fail as many projects as you can.30 -
A little while ago someone here posted something about a piece of software called Pi-Hole. To that person, i wanted to say THANK YOU!!! It is probably one of the best things i ever added to my network!26
-
!rant
Bought a Chromebook last weekend. Best. Decision. I've. Made.
It's so great. It's so light, it uses USB C to charge (so when I go to visit my parents halfway across the country, I can bring 1 cable for my phone, switch, and laptop), and it's the perfect Android development device, since it runs Android apps and you can use Android studio within crouton.
I have never loved a new device so much, and I remember the days when I mocked Chromebooks because they sucked. Android app support turned that around.4 -
I was tinkering around with my linux installation and trying to decide on a new terminal to use, and I ended up compiling st (suckless terminal). On a whim, I decided to look through the source code and see how much of it I would understand.
There was a C header file called arg.h that uses the preprocessor and macros to parse argument flags and songs by setting up a switch statement in a loop, all in under 50 LoC. To use it, just wrap the switch body between ARGBEGIN and ARGEND, and that's it. The comment at the top simply read "copy me if you can", a challenge to future programmers such as myself.
It was the most beautiful, elegant solution I have ever seen. I tried to tell my girlfriend about it, but she just didn't get it. Maybe some of you will appreciate it more:
https://github.com/chjj/st/... -
That feeling when you run out of YouTube videos to watch and end up in some weird ass corner of the internet watching some dude scream "lemons!" at his fish for 12 minutes.12
-
"Hmm, I have one hour left to hand-in my complete program via Moodle. I can still do something.
Let's implement a cheat when a user types 12oatmeal at the menu."3 -
Got invited to a "roundtable", where we will discuss email security and the future and direction of where it is going.
Only 10 people in Sweden got a chair
I feel exclusive but also scared that they will find out what a noob I am lol4 -
Just saw this, people competing who's gonna put coolest shit inside 140 characters
https://www.dwitter.net/top
Some serious (js)dev porn inside7 -
Ever tried "CodeGolf" on StackExchange?
https://codegolf.stackexchange.com
I did it for a while and had some fun.
Until it became the usual dick-measuring contest that is StackExchange.
"Have you tried...?"
Bitch did I ask for your help?
The final straw for me was when it became obvious that people were checking to make sure I hadn't lied about my character count. Then someone downvoted my answer after I misinterpreted the question.
That was it for me, fuck y'all.
This C# Christmas Tree was my highest voted answer, approx 1 year ago. (Hope the gif works.)6