Details
-
AboutCode is intimate and sacred. Your repository is a temple and you shouldn't share it with somebody who prefers spaces over tabs.
-
Skillsjavascript, node, jsx, postgresql
-
LocationEstonia
-
Github
Joined devRant on 2/19/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
-
This is my keyboard. There are many like it, but this one is mine. My keyboard is my best friend. It is my life. I must master it as I must master my life. Without me, my keyboard is useless. Without my keyboard, I am useless.
I can't believe how long I've had this one keyboard. I started my software developer career with it (went to my first coding interview with it), bought it before I had even had sex... Best investment of my life so far :D16 -
What do you guys think about the comma expression in JavaScript? I'm aware that due to it's (to some) unknown nature that it can lead to subtle bugs, but I have at least one good use case for it and wanted to hear reasons why I shouldn't use it for similar use cases, but also what would be some other cool (not necessarily "good") use cases :D8
-
Is there any benefit of having custom input field dialogs, eg. for date and time? Should I be using just the HTML5 tags as-is (only styling the field itself), or create custom dialogs (creating custom javascript dialogs on top of basic text fields)?8
-
There’s an interview question that i was asked years ago, and I’ve sometimes thought about it but haven’t still figured out an answer. The question is as follows.
You’re working on a project for a client and there’s 15 minutes until it should be delivered, but the solution is not finished yet. What do you do?
The only logical thing I thought of was to just contact the client and tell them it’ll take some more time, but at the same time, telling them 15 minutes before the deadline seems like a sign of bad planning and time management. And it’s probably not realistic to finish everything in 15 minutes. What woold you guys do?4 -
Two months ago I started working at a new company, who's system is a huge monolith. The company is a bit over one year old, and the code base is huge. The desire to move to more of a microservices architecture is on the radar, but one of the biggest issues in moving towards it is how we should keep our models. The stack is basically Node.js and Mongoose, where there's about a few dozen mongoose models that the whole system uses, and the issue is that, if we moved to a microservices architecture, how could we keep the models in sync. One idea I had was to keep the models in a separate (node) package that would be shared across all microservices, but then there's the issue that if one model needs changes, all microservices that use that model will need to be updated. Another idea we had was to not share models, but instead let every microservice be in charge of everything to do with a certain type of data (eg. Users are only directly accessed by one microservice, companies by another, and no two microservices share responsibility over data), but that might bring problems when one microservice depends on a certain set of data from another microservice. How do you guys manage all that? Any ideas or tips? Thanks ^^14
-
So, I just realised that a contribution I made to an open source project 12 days ago had gotten accepted 3 days ago. I'm so ecstatic over this!
I was basically just in need of type definitions for a javascript library, and seeing as it didn't have any, decided to make them myself. Done that, I made a pull request, but seeing as there was no changes after a few days, I forgot about it.
Now I just remembered about that, and wondered if it got any comments or anything, and it turned out that they had accepted my PR and it had already been put into a release 3 days ago
I can't contain myself right now, it was my first open-source contribution, and it just feels good to know that I somehow helped some people by giving them type definitions :D
Cheers1 -
Have you ever felt like you're too committed to your job, even though you'd be doing basically anything else? Yeah, me neither. That's why I spend the last two days and nights on writing a suite of smoke tests for our system.
Here's basically all the work hours I wrote down, during which the majority of the time I was writing the test suite. If anybody's curious about Wednesday, let's just say that decisions were made, and baggies were emptied.6 -
rant? rant!
I work for a company that develops a variety of software solutions for companies of varying sizes. The company has three people in charge, and small teams that each worked on a certain project. 9 months ago I joined the company as a junior developer, and coincidentally, we also started working on our biggest project so far - an online platform for buying groceries from a variety of vendors/merchants and having them be delivered to your doorstep on the same day (hadn't been done to this scale in Estonia yet). One of the people from management joined the team working on that. The company that ordered this is coincidentally being run by one of the richest men in Estonia. The platform included both the actual website for customers to use, a logistics system for routing between the merchants, the warehouse, and the customers, as well as a bunch of mobile apps for the couriers, warehouse personnel, etc. It was built on Node.js with Hapi (for the backend stuff), Angular 2 (for all the UIs, including the apps which are run through a WebView wrapper), and PostgreSQL (for the database). The deadline for the MVP we (read: the management) gave them, but we finished it in about 7 months in a team of five.
The hours were insane, from 10 AM to 10 PM if lucky. When we weren't lucky (which was half of the time, if not more), we had to work until anywhere from 12 PM to 3 AM, sometimes even the whole night. The weekends weren't any better, for the majority of the time we had to put in even more extra hours on the weekends. Luckily, we were paid extra for them, but the salary was no way near fair (the majority of the team earned about 1000€/mo after taxes in a country where junior developers usually earn 1500€/month). Also because of the short deadline given to us, we skipped all the important parts like writing tests, doing CI, code reviews, feature branching/PR's, etc. I tried pushing the team and the management to at least write tests and make feature branches/PRs, but the management always told me that there wasn't enough time to coordinate and work on all that, that we'll do that after launching the MVP, etc. We basically just wrote features, tested them by hand, and pushed into the "test" branch which would later get tested and merged into master.
During development, one of the other juniors managed to write the worst kind of Angular code you could imagine - enormous amounts of duplication, no reusable components (every view contained the everything used in the view, so popups and other parts that should logically be reusable were in every view separately), fuck - even the HTML was broken (the most memorable for me were the "table > tr > div > td" ones, but that's barely scratching the surface). He left a few months into the project, and we had to build upon his shit, ever so slightly trying to fix the shit he produced. This could have definitely been avoided if we did code reviews.
A month after launching the MVP for internal testing, the guy working on the logistics system had burned out and left the company (he's earning more than twice the salary he got here, happy for him, he is a great coder and an even better team player). This could have been avoided if this project had been planned better, but I can't really blame them, since it was the first project they had at this scale (even though they had given longer deadlines for projects way smaller than this).
After we finished and launched the MVP, the second guy from management joined, because he saw we needed extra help. Again I tried to push us into investing the time to write tests for the system (because at this point we had created an unstable cluster fuck of a codebase), but again to no avail. The same "no time, just test it manually for now, we'll do that later when we have time" bullshit from management.
Now, a few weeks ago, the third guy from management joined. He saw what a disaster our whole project was. Him joining was simply a blessing from the skies. He started off by writing migrations using sequelize. I talked to him about writing tests and everything, and he actually listened. He told me that I'm gonna be the one writing them, and also talked to the rest of management about it. I was overjoyed. I could actually hear the bitterness in the voices of the rest of management when they told me how to write the tests, what to test, etc. But I didn't give a flying rat's ass, I was hapi.
I was told to start off by writing a smoke test for the whole client flow using Puppeteer. I got even happier, since I was finally able to again learn new things (this stopped at about 4 or 5 months into the project).
I'm using jest as the framework and started writing the tests in TypeScript. Later I found a library called jest-extended, but it didn't have type defs, so I decided to write them and, for the first time in my life, contribute to the open source community.19 -
Disclaimer: This is all theoretical. Neither me nor my friend (with whom I discussed this) are stupid enough to even try to pursue this, but as an idea, i believe it might generate cool/new ideas/ways for handling secure communications across social groups.
Let's do some role play. Let's design a delivery app for drug dealers, think Seamless or Uber Eats, but for drugs. Not for big deliveries, like kilograms of coke, but smaller stuff. Maybe a few grams of it or something. The clients could rate dealers, and vide-versa. This would build a level of trust within the system. There would be no names, just anonymous reviews, ratings, and prices. Only the info you'd need to know.
The biggest (only?) problem we found (besides legality) was that, how would you prove that you're a client and not a snitch (or cop). This would have to somehow be handled both on signup, as well as when ordering (let's imagine that all who are clients are pure and won't ever snitch).
One of the ways we found to combat this was to have the app invite-only. This would, in theory, do away with the problem of having snitches signing up. However, what if the phone got stolen/breached by a snitch, and they also got full access to the account. One way we thought we could combat this would be with a "dispose number" or something similar. Basically, you call a number, or send a text, or message a Signal bot etc, which would lead to the account's instant termination, no traces of that user left. Hence, a dispose number.
The flow of the app would be as follows:
A client wants some amount of heroin. He opens the app, searches for a dealer, sends the him the desired amount, and in return gets back a price from the dealer. If both parties agree on the amount and price, the deal would start.
The app would then select a random time (taken from the client's selected timeframe and the dealer's "open" time) and a location (within a certain radius of both them, somewhere in between them both for convenience). If both of them accept the time and place, they'll have to meet up at said time and place.
The actual delivery could also be done using two dead drops - the client drops the money at one of them, the dealer drops the goods at the other one. Yes, this might be subject to abuse, but it wouldn't be that bad. I doubt that clients would make huge orders to unknown/badly rated dealers, as well as dealers accepting offers from badly rated clients. My idea is that they would start small, just so if they do lose their money/goods, the actual loss wouldn't be as big for them, but for the other party, having bad ratings would mean less clients willing to buy or dealers willing to sell.
A third way would be to use crypto, but the reason I left this as the last one is because it's not that wide-spread yet, at least not in local drug dealing. With this method, the client would initiate the order, the crypto would be sent to either the dealer or an escrow account, the dealer would then drop the goods at a random place and let the client know where to go to get them. After the client has gotten the goods, they could both review/rate the quality as well as the overall experience with that dealer, which would either make or break the dealer's upcoming deals. This would be pretty much like other DNM's, but on a local scale, making deliveries faster.
So far, this would seem like something that would work. Are there any ideas that might improve this? Anything that might make things more secure/anonymous?
My reason for this post is to spark a conversation about security and anonymity, not to endorse drugs or other illegal stuff.
Cheers!
PS. Really loving the new PC design of devRant14 -
The most excited I've been about a piece of code would probably be the time when I made a resource hogging thing in C. The reason I was really excited was because I haven't really written C/C++ that much, at that time I wrote Java mainly. Anyway, I was able to use up nearly 90% of the CPU (i7 something), as well as 14-15/16gb of ram the school computers had. A professor there saw it and was proud of me, which really motivated me. So I compiled it and copied it to almost all the library computers (with less resources), hid it, and made a shortcut to it on the desktop disguised as Chrome.
-
So, maybe 6 hours ago or so, I was randomly browsing Github and stuff, came across https://git.io/vABiT in the Trending page. "Hell yeah, I'd go for some swag".
Started looking through them all, eventually found myself here on devRant. Instantly fell in love, it's the perfect mix of jokes, puns, and rants. Now it's 5 AM and I've got work at 10... Worth it, for sure!
Anyways, hello guys, glad to have found this place, really loving the feel of it all.3