Details
-
AboutHave been programming since 1980.
-
SkillsC#, Typescript, React, Javascript, Sql, (PHP, Turbo Pascal, Visual basic, GW Basic, Bash, c , ...)
-
LocationSweden
Joined devRant on 6/8/2016
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
-
My tokenizer can how tokenize many statements rather than just a single statement. ^_^ I'll make it open source once I've done a bit more work on it but so far I'm happy.9
-
My goal is to study for 300 hours (coding problems, behavioral, and system design combined) before I start applying for companies.
Is this overkill? Is it enough?
I put a "stop" on my studying since I know there will always be a question that's a "got-ya" or some extremely hard Leetcode question that require some obscure algorithm from college that had 1 figure about it.5 -
The Official DevRant User Leaderboard is Here, It is a list of all "Discoverable" users on DevRant. While making this Rant, various interesting facts were discovered, The Top 1000 list is available here https://gist.github.com/theabbie/...
The Top 100 will be featured here, Results in Comments,239 -
Here’s book most of you have either read a newer edition or some variant based on this book, as computer science students you had to take an intro to logic course.. prior to digital logic.. or atleast that’s how it went for me and many others I know.
Which regardless how much the universities screwed up teaching comp sci and programming.. this is one aspect I think they nailed. Requiring philosophical logic course for comp sci.
Again this isn’t a digital logic book. It’s just philosophical logic. The first edition of this book came out in 1953... and I think they are edition 14 or 15... for a book to have this many editions and last this long thru time it’s a good book.
It’s a book that should be a must read for anyone venturing into AI and working on human machine thought processing.
It’s a great book to have around as reference, considering philosophical logic is not a walk in the park atleast not in the beginning because it requires you to change the way you view things.. more specifically it requires you to think objectively and make decisions objectively rather than subjective emotional reasoning.
Programmers need to think objectively with everything they do. The moment you begin thinking subjectively .. ie personal style, wishes and wants, or personal reasons and put that into code for a code base with a team u just put the team at risk.
Does this book teach objective thought? No... indirectly yes, because it teaches the objective rules of logic... you don’t get to have an emotional opinion on wether you agree or disagree or whatnot, logic is logic even philosophical. Many people failed the logic course I was in university.. infact the bell curve was c- / D ... many people had to take the course more than once.. they even had to change the way the grading was done.. just to get more people to pass...
But here’s the thing it’s not about it being taught wrong.. people just couldn’t adapt to thinking objectively, with rules as such in philosophical logic courses. Grant it the symbols takes time getting use to but it literally wasn’t the reason people failed.. it was their subjective opinions and thought process interfereing with the objectiveness of the course exams and homework.5 -
So I cracked prime factorization. For real.
I can factor a 1024 bit product in 11hours on an i3.
No GPU acceleration, no massive memory overhead. Probably a lot faster with parallel computation on a better cpu, or even on a gpu.
4096 bits in 97-98 hours.
Verifiable. Not shitting you. My hearts beating out of my fucking chest. Maybe it was an act of god, I don't know, but it works.
What should I do with it?241 -
AI generated cats. Post your best results. (You can refresh the page to get a new cat)
https://thiscatdoesnotexist.com/.
Beware though you might encounter some nightmares on your way12 -
This one is for devs and gamers.
But first some background story.
My girlfriend is special. Not just generically lovey mush mush special. She is 1 in 100 more accurately 1 in 10000. She was born with a rare Congenital Heart Defect {CHD}. Called Truncus Arteriosus or TA for sake of brevity. TA's main thing is the two main arteries going into the heart are fused together and never seperated at birth. It's bad news. There is no cure for this kind of thing. Simply repairs that happen over the course of life.
So here is me. Desperately trying to find a way to get the word about this and the 40 other types of CHD out there in the world. I thought. "What if I make a game..." Not based around the medical jargon but on a level people could understand. I spent the better part of the last six years attending appointments with her and still don't get it. What I do get is her Emotional state. How her CHD causes her to think and feel.
So here is the pitch.
The game is about a girl who is diagnosed at birth with a CHD. She is now in her 20's and has to undergo an open heart surgery to repair the defect. The day comes. She goes under but when she wakes up she find herself in a final fantasy style environment. This new world has a darkness cast over it. She is unknowingly the hero of this world and she has to face off with multiple bosses of varied degrees of evil.
Then after beating these bosses she really wakes up from the surgery. Waking up to the realization that the world she saved was herself. And all the bosses were manifestations of her own internal feelings. Depression, anxiety, hopelessness, Denise, desire and so on.
I would sell this game with the caveat that 2/3 of all profits get split between the Adult Congenital Heart Association and Project Heart. As those are the two main organizations that deal heavily with creating standards of care and raising awareness for CHD survivors.
Thoughts?
Note: I am still learning game dev. This is an eventual goal for me.33 -
Rust noob Q:
Given x a variable on the heap, e.g.
let x = String::from("Hello, devRant!");
Then, given some function that I didn't write (from a library) that takes ownership of its argument:
fn some_function(y: String) -> bool { ... }
How would you handle this situation:
if some_function(x) {
another_function(x); // not ok, because x has gone out of scope in the line before
}
Is it idiomatic to just clone() x in the first call? That seems bad practice, because it's the second (or some other additional) call that needs x. What should I be doing instead?8 -
Implementing a duration timer in my bright and shiny exercise application. Testing it and I was sure that one second after 7159 it should print out "02:00:00" (since 7200 seconds is 2 hours).
Didn't understand why it took the timer to show 2 hours after 41 seconds instead of just 1 second..5 -
Hey Designer/Developers, I got a question for you. Yeah, you 👇🏽
When working on a project codebase that is expected to grow and evolve heavily. How do you usually split up your CSS (SASS, LESS etc) in a good way to take into account all the different device sizes?
I am not asking how it is done but more about the design of the code. This would be for a production codebase to be released.
Do you use large blocks broken down by media...
(Media width) {
~site code
}
(Other media) {
~same site code with diff sizes
}
Or do you do individual media queries inside css classes...
.className {
(Media size) {
}
(Other media) {
}
}
Or a mixture of both?
If it is a mixture of both then how do you decide which way to go about structuring the code.
I have been endeavouring to greatly improve my CSS and have done so. But this question has been bugging me. Both sides seem to be a bit sloppy and my programmer side is fighting the repeatitipve code.
Note: all code examples are gibberish and only intended for visualization.17 -
On other GDPR news: ICANN has now made an exception to european TLDs (not .com, .net, etc.) so that they don't have to provide the WHOIS information at all, so there is no need to even "protect" it.7
-
Aardwolf is very fun and i suggest y'all play it a bit if you're looking for better ways to slack off at work
$ telnet aardwolf.org 4000
*port 23 also works23 -
You know the story about Battlefront 2? How long it takes to farm points to unlock those cool characters like Darth Vader etc? Yeah, it takes some time. Time that I necessarily don’t want to spend on mindless playing. I thought I’d try to beat the system by building this thing that would play the game for me by moving and jumping every few seconds.
I already have the code ready and now I just need to build the physical thing that will actually interact with the controller.
I am using an Arduino Uno with two micro servos.
Honestly I just want to see if I could build it, I’m not sure I will actually use it (you barely get any points if you’re not killing people anyway).
I’ll keep you posted with the result!13 -
Not Speaking The Same Programming Language
(It is the mid 80s, and I have a coworker come to me with two full pages of computer programming source code.)
Coworker: “Hey, can you help me with this? This function is not working right.”
Me: “Sure. What’s it do?”
Coworker: “Well, on the first line I copy…” *drones on for a few seconds about stuff I can clearly read*
Me: “Wait! Let me interrupt for a moment. I can read the code. In 20 words or less, what does this do?“
Coworker: *long pause that tells me he’s having trouble seeing the forest for the trees* “It, um, converts a date that’s a string to three integers: month, day, and year.”
Me: “Ah! Excellent. And by the time you get the string, has it been sanitized? You know, guaranteed to be pairs of digits with a slash in-between, not blanks or words or other garbage?”
Coworker: “Oh, yeah, all the user input is cleaned up.”
Me: “Okay, good.”
(I scribble “sscanf(text, “%02d/%02d/%02d”, &month, &day, &year);” in a blank spot on the page.)
Me: “Throw out everything and replace it with that.”
Coworker: “You’re kidding.”
Me: “Not at all. Use that. It’ll work. Trust me.”
Coworker: *not sure* “Well, okay.”
(Half an hour later he’s back and looking a bit sheepish.)
Coworker: “That worked. Thanks.”
Me: “No problem.”
(It’s been 30 years. Unfortunately, the new generation of programmers is in the same spot.)
https://notalwaysright.com/not-spea...2 -
So for a while I have wanted to build a raspberry pi cluster. In the spirit of shia labeouf I got started last saturday.
I had two pies lying around so I figured I'd run some experiments before I invested in a lot of hardware. After about a day I had turned the two pies into a shared cluster when disaster struck....
I had completely ignored the fact that you cannot run 32 or 64bit software on an arm processor (I know... I'm a java developer). So when I booted my service and the load balancer, I found that nothing worked. So pretty bumbed out, I quit the project.
Later that day I found a crazy guy who had bought a batch of 400 small form factor PSUs (300W) and internally I laughed at him a little. I mean, who's gonna sell 300W irregular power supplies. Then, just as I was about to go to bed I found this guy, he was selling from a batch of CPU-onboard motherboard for 10 bucks each and everything clicked!
I did some quick calculations and decided I could probably gather enough cash to get: 10 motherboards, 10 2GB ram dimms, 10 Sata disks and 14 PSU (in case some fail) and some misc hardware for networking and such.
So... Long story short, I am going to build a cluster computer, the first version is going to have 10 nodes and I am waiting for delivery right now!12 -
Who can come up with the best DevOps Power Ballad? I'll start off:
Phil Collins - Something happened on the way to production.
GO!12