Details
-
AboutAbout?
-
SkillsRequired
-
Location~/far far away
-
Website
Joined devRant on 8/5/2018
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
-
Me: Optimize a sort & match method in backend because users complain it's a bit slow.
Coworker: These algorithms are both O(n), so they're identical *closes PR*
Me: *start zoom call* "Heeeeeeeeeey Iiiiiiiiiii wouuuuuuuld liiiiiiiiike toooooo diiiiiisscuuuuus thaaaaaaaat puuuuuuulllll reeeeeequuuueeest yooooouuuuu cloooooossseeeed"
Coworker: "wtf are you doing, why are you talking so slow"
Me: "No matter whether I talk fast or slow, the information still reaches you in O(n) time, so why are you complaining"
I fucking hate it when people misunderstand the purpose of (or abuse) big O notation. It's an estimate of how an algorithm SCALES once the set increases in size, in which case you leave out both less significant terms and constant factors.
But those terms and factors are important when you're talking about the DIRECT PERFORMANCE of the algorithm on fixed-size sets, instead of SCALING to larger sets.
1n and 10n are both O(n), but 10x performance on a job that used to take 10 minutes is still significant.19 -
In PHP (yes, it's a language I... don't hate) I've always hated exceptions. They're like GOTO, in an OOP world with interfaces and contracts, try/catch is really odd as it breaks a promise about returning with a typed value.
But you can now do this in PHP8, which comes pretty close to Maybe/Either monads (Option, Result whatever it's called in other languages):
function getUser(): User | UserNotFound
PHP8 unions don't come with the same strong guarantees as in other languages but *pets PHP gently on the head* you did well, my boy.
Now I would really love it if PHP9 could do:
function getUsers(): Collection<User>
Type Tree<T> = Null | Node<T>;
function 🎄(): Tree<Branch<Ornament|Light|null>>15 -
It’s throw back Thursday!
Back to 1979... before the time of the red dragon book compiler book, (forgetting about the green dragon book) ... there was a time where only a few well written compiler and assembler “theory” books existed.
What’s special about this one? Well Calingaert was the co patentor of the OS/360. .. “okay soo? ... well Fred Brook’s Mythical Man-Month book I posted the other day. Calingaert is basically the counterpart of brooks on the OS/360.
Anyway, the code is in assembly (obviously) and the compiler code is basic.
Other than this book and from my understanding 2-3 other books that’s all that was available on compilers and assemblers as far as books written goes at the token.
ALLL the rest of knowledge for compilers existed in the ACM and other computing journals of the time.
Is this book relevant today, eh not really, other than giving prospective, it’s a short in comparison to the red dragon books.
If you did read it, it’s more of a book that gives you more lecture and background and concepts.. rather than here’s a swath of code.. copy it and run.. done.. nope didn’t happen in this book.. apply what you lean here10 -
From the guy who wrote all the Programming Microsoft books and the Annotated Turing book. Comes this book.
This book is great for beginners great for people who don’t know a lot about software and how computers work, simple read. I like it because it also gives a different prospective, beginning at Morse code and works up from there all the way up to high level languages.
The book gives snippets of code to discuss it not really a tutorial book. It’s a different type of book that all people could understand.
Good read32 -
What's your most trusted computer part manufacturer list? Personally, it goes something like this:
CPU: AMD. They're performing at or above Intel's spec, without the weekly IME holes. Sometimes cost a little more, but they last way longer.
GPU: AMD, ASUS, MSI. MSI is usually over-priced but performs a smidge better, ASUS is usually a good middle-ground. Anything with an AMD chipset's usually gonna hold together fairly well, though, and won't require massively-unstable closed-source drivers for decent Linux performance. "but muh cuda" doesn't fly when OpenCL is actually, well, open.
Storage: Seagate, obviously, and SanDisk for cheap SSDs. SanDisk SSDs, especially their cheapest ones, are durable as shit for price. As for the Seagate pick... is that not self-explanatory?
Mobo: ASUS, ASRock if you need garbage in a pinch. ASUS boards are usually fairly tough, and ASRock is cheap trash for that backup tower that's gone bad in the closet.
PSU: EVGA, accept no substitute. EVGA PSUs are durable as fuck and fairly cheap, compared to other "ultra-durable" brands.36 -
THE HOLY GRAIL BOOK OF COMPUTER SCIENCE HAS ARRIVED!
52 years old and the book set is still not complete24 -
Companies can't use free software?
Well, I just forced everyone to use Nextcloud instead of Dropbox and Google Drive. People did not like it as first but the quickly realized how good it was.
We also moved from skype, teams and slack to matrix.
I am glad that matrix-synapse is so easy to install nowadays!18 -
Primarily IntelliJ IDEs.
I'm using IDEA for Rust & Kotlin, PHPStorm, Datagrip (DB), and sometimes PyCharm CE.
IDEs can feel a bit dirty with how heavy they are, and the lack of customization/control. But at the end of the day there's just nothing that can measure up against IntelliJ's inspections, integrations and project indexing.
My ideal product would be one universal IntelliJ IDE, but combined with the openness of VSCode/Atom, having everything transparently configurable through stylesheets and scripts.
As an editor though.... I use Vim for LaTeX, Markdown, plain text and Haskell code... but not so much for other programming languages.
Vim was my first editor when I moved from C64 to PC development 25 years ago, and while you get used to balancing keybind vimgolfing with being actually productive, i've always found maintaining plugins and profiles too cumbersome -- the reality is that Vim is an awesome TEXT editor, but it's really awful as a CODE editor out of the box.
When you want to try out a new programming language, you don't want to have to mess around with your Vimrc and Vundle and YCM for half a day just so you can comfortably write "Hello World" in Rust or Elixir... you just want to click one install button, press F10 to compile and see if it flies.
Oh, and I use Xed a lot for quickly editing files... because it's the default GUI editor on Mint desktops, and it's quite good at being a basic notepad.1 -
Is it just me or are books on algorithms split between being too simplistic and being too detailed to be practical. I read Donald Knuth's book "The Art of Computer Programming Vol.1" read about 10% of it , which is like 3 chapters. I really enjoyed those chapters, Knuth's is such a genius but then the rest of the book was so complicated that the introduction and definition of terms was longer than some whole chapters in the same book. I decided to look for another, found a really good one, but it was analyzing algorithms in Java, sigh, I hardly code in Java so it was exactly easy for me to follow when he keeps mentioning the "comparable" attribute on sorting algorithms. I then got another really followed it till the keep on referencing indicator variables, I had read 3 books now and had not had of these indicator variables. Am sure they are not that common in the Computer Science literature so I was left wondering why I had to learn to analyze code with indicator variables though it was not a standardized in the "Computer Culture" would I be the only one who does this?.. I hence gave up on learning algorithms till I got that book that was just right for me5
-
Have a question about email service providers. Specifically inbox delivery and warmup. Over the years I gathered a ~200k email database of players from my projects. I cleared them by using debounce.io and now I have 100k clean emails. That means I can send a mass newsletter and bounce rate should be good. Now my main question is what email services provider should I use? For email client I thought of setting up sendy.co, for hosting it use sendybay.com and for smtp use pepipost.com But the problem with sendy is that it sends emails without any delay. Like 2-3 emails a second. Is there a difference in terms of inbox delivery and domain reputation wether I send all emails in bulk with sendy or should I try to keep low profile and send lets say 1k a day? I have friends who use amazon ses and they are able to send even 100k a day, given that emails database is cleared(valid working emails) and bounce rate is low.6
-
!rant
After over 20 years as a Software Engineer, Architect, and Manager, I want to pass along some unsolicited advice to junior developers either because I grew through it, or I've had to deal with developers who behaved poorly:
1) Your ego will hurt you FAR more than your junior coding skills. Nobody expects you to be the best early in your career, so don't act like you are.
2) Working independently is a must. It's okay to ask questions, but ask sparingly. Remember, mid and senior level guys need to focus just as much as you do, so before interrupting them, exhaust your resources (Google, Stack Overflow, books, etc..)
3) Working code != good code. You are an author. Write your code so that it can be read. Accept criticism that may seem trivial such as renaming a variable or method. If someone is suggesting it, it's because they didn't know what it did without further investigation.
4) Ask for peer reviews and LISTEN to the critique. Even after 20+ years, I send my code to more junior developers and often get good corrections sent back. (remember the ego thing from tip #1?) Even if they have no critiques for me, sometimes they will see a technique I used and learn from that. Peer reviews are win-win-win.
5) When in doubt, do NOT BS your way out. Refer to someone who knows, or offer to get back to them. Often times, persons other than engineers will take what you said as gospel. If that later turns out to be wrong, a bunch of people will have to get involved to clean up the expectations.
6) Slow down in order to speed up. Always start a task by thinking about the very high level use cases, then slowly work through your logic to achieve that. Rushing to complete, even for senior engineers, usually means less-than-ideal code that somebody will have to maintain.
7) Write documentation, always! Even if your company doesn't take documentation seriously, other engineers will remember how well documented your code is, and they will appreciate you for it/think of you next time that sweet job opens up.
8) Good code is important, but good impressions are better. I have code that is the most embarrassing crap ever still in production to this day. People don't think of me as "that shitty developer who wrote that ugly ass code that one time a decade ago," They think of me as "that developer who was fun to work with and busted his ass." Because of that, I've never been unemployed for more than a day. It's critical to have a good network and good references.
9) Don't shy away from the unknown. It's easy to hope somebody else picks up that task that you don't understand, but you wont learn it if they do. The daunting, unknown tasks are the most rewarding to complete (and trust me, other devs will notice.)
10) Learning is up to you. I can't tell you the number of engineers I passed on hiring because their answer to what they know about PHP7 was: "Nothing. I haven't learned it yet because my current company is still using PHP5." This is YOUR craft. It's not up to your employer to keep you relevant in the job market, it's up to YOU. You don't always need to be a pro at the latest and greatest, but at least read the changelog. Stay abreast of current technology, security threats, etc...
These are just a few quick tips from my experience. Others may chime in with theirs, and some may dispute mine. I wish you all fruitful careers!221 -
I found out recently that Facebook is embedding tracking data in the form of IPTC metadata in images that you upload. This way the images can be tracked even after you download them.
Because I'm an anarchist and just want to watch the world burn a little, I made a tiny server to replace the id hash that they embed with a random one, just to see if I can't fuck with their algorithm a little bit.
You can check out the project here https://github.com/watzon/fbmdob15 -
How do you get new employees?
We have a lack of personnel in our company. We do not receive applications via job advertisements or advertising.
Our company is modern, has good project planning and employees receive company cars. Projects made in react, node, php, java and python.
So, how can we find new employees? Which way are you going?19 -
Is anyone here with ASD? How are you cope with communication with colleagues? At the moment I'm junior dev and need ask and discuss more, but it's difficult to explain what I mean and make correct questions5
-
Hey hackers!
As a pentester, I want to know how an attacker is able to understand if there is a honypot listening on a specific port .
If he can understand ,how to prevent him from doing so?11 -
Yes Linus Torvalds is an asshole and the world is better because of it.
In short Linus's acid takes on code quality over developer fee fee's might be one of the things that has made the Linux kernel and the GNU/Linux project such a long lasting open source success and in my opinion the risk of him falling for all this "let's be nice and non offensive" bs trend may impact negatively on code quality.
Being an asshole has it's downsides and it's not always the best response, I'll give you that, but personally I think most of us who are viewed as assholes are seen like that because we put quality over convenience, facts before feelings and dedication over mediocrity; it is not because we hate you, it's because we measure ourselves with the same stick.
It depends on one's character, but when you've been toughened up because of bullying(I don't doubt many devs have been since being a nerd has never been hip) or life in general, you learn to stop whining & pick yourself up and you expect everyone to be competitive and competent as you are and it gets frustrating to manage people who don't fulfill your expectations.
Pros: You get shit done and you do it well.
Cons: People won't like you and you don't tolerate failure (much less mediocrity).
Yes Linus is an asshole, my coach was an asshole, some of my best teacher's have been assholes, I had friends who were assholes, heck I'm an asshole!
But I thank them because they made me better than I was, just as people have thanked me for being the right amount of asshole.
A warm thank you and fuck you Linus, keep being the asshole we need.36 -
Ever heard of event-based programming? Nope? Well, here we are.
This is a software design pattern that revolves around controlling and defining state and behaviour. It has a temporal component (the code can rewind to a previous point in time), and is perfectly suited for writing state machines.
I think I could use some peer-review on this idea.
Here's the original spec for a full language: https://gist.github.com/voodooattac...
(which I found to be completely unnecessary, since I just implemented this pattern in plain TypeScript with no extra dependencies. See attached image for how TS code looks like).
The fact that it transcends language barriers if implemented as a library instead of a full language means less complexity in the face of adaptation.
Moving on, I was reviewing the idea again today when I discovered an amazing fact: because this is based on gene expression, and since DNA is recombinant, any state machine code built using this pattern is also recombinant[1]. Meaning you can mix and match condition bodies (as you would mix complete genes) in any program and it would exhibit the functionality you picked or added.
You can literally add behaviour from a program (for example, an NPC) to another by copying and pasting new code from a file to another. Assuming there aren't any conflicts in variable names between the two, and that the variables (for example `state.health` and `state.mood`) mean the same thing to both programs.
If you combine two unrelated programs (a server and a desktop application, for example) then assuming there are no variables clashing, your new program will work as a desktop application and as a server at the same time.
I plan to publish the TypeScript reference implementation/library to npm and GitHub once it has all basic functionality, along with an article describing this and how it all works.
I wish I had a good academic background now, because I think this is worthy of a spec/research paper. Unfortunately, I don't have any connections in academia. (If you're interested in writing a paper about this, please let me know)
Edit: here's the current preliminary code: https://gist.github.com/voodooattac...
***
[1] https://en.wikipedia.org/wiki/...29 -
I had a secondary Gmail account with a really nice short nickname (from the early invite/alpha days), forwarded to another of my mailboxes. It had a weak password, leaked as part of one of the many database leaks.
Eventually I noticed some dude in Brazil started using my Gmail, and he changed the password — but I still got a copy of everything he did through the forwarding rule. I caught him bragging to a friend on how he cracked hashes and stole and sold email accounts and user details in bulk.
He used my account as his main email account. Over the years I saw more and more personal details getting through. Eventually I received a mail with a plaintext password... which he also used for a PayPal account, coupled to a Mastercard.
I used a local website to send him a giant expensive bouquet of flowers with a box of chocolates, using his own PayPal and the default shipping address.
I included a card:
"Congratulations on acquiring my Gmail account, even if I'm 7 years late. Thanks for letting me be such an integral part of your life, for letting me know who you are, what you buy, how much you earn, who your family and friends are and where you live. I've surprised your mother with a cruise ticket as you mentioned on Facebook how sorry you were that you forgot her birthday and couldn't buy her a nice present. She seems like a lovely woman. I've also made a $1000 donation in your name to the EFF, to celebrate our distant friendship"31 -
The inevitable happened, the user that I've answered tons of questions about freelancing deleted his account, thankfully I took backups and will recreate it [together with a killed joke] in the comments below (should've just webarchived it, meh)
I'll keep adding questions & answers I come across to make this a useful resource for people that want to get into freelancing, want to ask me something in the comments, you name it.
Might compile it into a better searchable resource eventually (some sort of blog with TOC), but right now neither do I have the time nor will to do that.
Wish I could have taken over the link that has been now posted a lot, but every post has an ID and I doubt it's possible, will tag dfox to clarify though and also floydian and devtea, that have been so nice to always post a link to that one rant.52 -
The Linux Kernel, not just because of the end product. I find it's organizational structure and size (both in code and contributors) inspirational.
Firefox. Even if you don't use it as your main browser, the sheer amount of work Mozilla has contributed to the world is amazing.
OpenTTD. I liked the original game, and 25 years after release some devs are still actively maintaining an open source clone with support for mods.
Git. Without it, it would not just be harder working on your own source code, it would also be harder to try out other people's projects.
FZF is possibly my favorite command line tool.
Kitty has recently become my favorite terminal.
My favorite thing open source has brought forth though is a certain mindset, which in the last decade can be felt most heavily in the fact that:
1. Scientific papers with accompanying GitHub urls, especially when it comes to AI. Cutting edge research is one git clone away.
2. There are so many open hardware projects. From raspberry pi to 3d printers to laser cutters, being a "maker" suddenly became a mainstream hobby.12 -
Holy shit I love this, that's fucking amazing, it's basically a modern terminal browser, that actually has html5, css support etc. not like elinks, especially nice inside tmux for sure.
"Browsh is a fully-modern text-based browser. It renders anything that a modern browser can; HTML5, CSS3, JS, video and even WebGL. Its main purpose is to be run on a remote server and accessed via SSH/Mosh or the in-browser HTML service in order to significantly reduce bandwidth and thus both increase browsing speeds and decrease bandwidth costs."
https://www.brow.sh/
demo: https://youtube.com/watch/...
https://motherboard.vice.com/en_us/...24 -
curl cheat.sh — get an instant answer to any question on (almost) any programming language from the command line
tldr
do curl cht.sh/go/execute+external+program to see how to execute external program in go
And this question: why I actually should I start the browser, and the browser has to downloads tons of JS, CSS and HTML, render them thereafter, only to show me some small output,
some small text, number or even some plot. Why can't I do a trivial query from the command line
and instantly get what I want?
I decided to create some service that will work as I think such a service should work.
And that is how wttr.in was created.
Nowadays you probably know, how to check the weather from the command line, but if not:
curl wttr.in
or
curl wttr.in/Paris
(curl wetter in Paris if you want to know the weather in Paris)
After that several other services were created (the point was to check how good the console
can solve the task, so I tried to create services providing information
of various nature: text, numbers, plots, pseudo graphic etc.):
curl rate.sx/btc # to check exchange rate of any (crypto)currency
curl qrenco.de/google.com # to QRenco.de any text
And now last but not least, the gem in this collection: cheat.sh.
The original idea behind the service was just to deliver a various UNIX/Linux command line cheat sheets via curl. There are several beautiful community driven cheat sheet repositories such as tldr, but the problem is that to use them you have to install them first, and it is quite often that you have no time for it, you just want to quickly check some cheat sheet.
With cheat.sh you don't need to install anything, just do:
curl cheat.sh/tar (or whatever)
you will get a cheat sheet for this command (if such cheat sheet exists inf one of the most popular community-driven cheat sheet repositories; but it surely does).
But then I thought: why actually show only existing cheat sheets? Why not generate cheat sheets or better to say on the fly? And that is how the next major update of cheat.sh was created.
Now you can simply do:
curl cht.sh/python/copy+files
curl cht.sh/go/execute+external+program
curl cht.sh/js/async+file+read
or even
curl cht.sh/python/копировать+файл
curl cht.sh/ruby/Datei+löschen
curl cht.sh/lua/复制文件
and get your question answered
(cht.sh is an alias for cheat.sh).
And it does not matter what language have you used to ask the question. To be short, all pairs (human language => programming language) are supported.
One very important major advantage of console oriented interfaces is that they are easily
programmable and can be easily integrated with various systems.
For example, Vim and Emacs plugins were created by means of that you can
query the service directly from the editor so that you can just write your
questions in the buffer and convert them in code with a keystroke.
The service is of course far from the perfection,
there are plenty of things to be fixed and to be implemented,
but now you can see its contours and see the contours of this approach,
console oriented services.
The service (as well as the other mentioned above services) is opensource, its code is available here:
https://github.com/chubin/cheat.sh
What do you think about this service?
What do you think about this approach?
Have you already heard about these services before?
Have you used them?
If yes, what do you like about them and what are you missing?26 -
Do you all have your own VPS server to host your own portfolio website ? If yes provide me with a decent one.7
-
When you stare into git, git stares back.
It's fucking infinite.
Me 2 years ago:
"uh was it git fetch or git pull?"
Me 1 year ago:
"Look, I printed these 5 git commands on a laptop sticker, this is all I need for my workflow! branch, pull, commit, merge, push! Git is easy!"
Me now:
"Hold my beer, I'll just do git format-patch -k --stdout HEAD..feature -- script.js | git am -3 -k to steal that file from your branch, then git rebase master && git rebase -i HEAD~$(git rev-list --count master..HEAD) to clean up the commit messages, and a git branch --merged | grep -v "\*" | xargs -n 1 git branch -d to clean up the branches, oh lets see how many words you've added with git diff --word-diff=porcelain | grep -e '^+[^+]' | wc -w, hmm maybe I should alias some of this stuff..."
Do you have any git tricks/favorites which you use so often that you've aliased them?50 -
Some of you probably already know about this, but I figured i'd post it just in case.
Found a USB multiboot solution called Easy2Boot that supports over 300 different types of ISOs and payload files.
You could have 10 different linux live distros on the same USB or maybe a bunch of different windows installations on the same USB. The feature list is quite huge and it seems better than the other multiboot alternatives I found out there.
Happy booting9