Details
-
AboutIm a 19 year old programing student and a web designer. Love dogs, PC hardware and beaches.
-
SkillsHTML, CSS, JavaScript, PHP
-
LocationSri lanka
-
Website
-
Github
Joined devRant on 8/14/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
-
Actual code
if (dict.ContainsKey(key))
{
//do nothing
}
else
{
dict.Add(key, value);
}
I'm speechless15 -
Manager said we need to use Queue. Several meetings after then I looked at prototype by 6 senior devs:
A QueueListener connects to RabbitMQ check for payload then *disconnects*;
A TaskProvider in ASP.Net.MVC.Core(whatever it is) listening http and dependency inject that QueuePoller;
A Visual Cron timer calls that http url every 5 minutes.
Wait for it: a set of database tables to store messages for another MessageProcessor.
It’s a XML to CSV file conversion project consists of 43 unique projects under a solution. I did it within 500 lines of Node with ElasticSearch and told we don’t use fancy new stuffs here.1 -
ArmA 3, a great sandbox that I "wasted" a lot time scripting modding or, if you like to call it that: developing for.
A game so great, the Multiplayer-server-browser stores the amount of players on a server in an 8 bit integer.
Someone complaint a few years ago.
Response: " be happy, it were 4 bits not to long ago"
There were Servers who ran into that problem.
To clarify, that only affected the shown number, not the amount of players, at least not directly.
Who likes to be lonely in a multiplayer game.1 -
What the actual fuck? Person (or people!) who devised this password policy, you are an idiot (or idiots - all of you). You are stupid and insane and have no idea about security or user experience.14
-
EDIT: devRant April Fools joke (2017)
-------------------------
@trogus and I have had an absolute blast working on devRant over the last year. However, we're strong believers in only working on a project if you're passionate about it, and over the last few months, we've sadly lost some of that passion so we've to announce, with heavy hearts, that we will both be moving on. We've decided to focus 100% of our energies on our next product, one which we are confident has billion dollar potential: Semicolon JS (http://semicolonjs.com).
We identified this sizable market opportunity as we were building out the new devRant website. Every JavaScript framework we tried left us wanting more. More efficiency. More elegance. More extensibility. That's what Semicolon JS is: more. More than a framework, it's a guiding philosophy. We believe that Semicolon JS will do for front end development what Material Design has done for user interface design. We're calling it Semicolon JS because even though you can still develop JavaScript without it, like a semicolon, we think it will soon become a standard and synonymous with quality JS development.
So comes the obvious question. What will happen to devRant? We wanted to make the announcement today because we will be officially shutting down the product in 30 days. So that gives everyone a full month to take in the last memories, look at those rants they really loved, and hopefully take some time to chat with @trogus and I about Semicolon JS and what we have planned.
With so many thanks and looking towards the future,
- @dfox and @trogus160 -
"You gave us bad code! We ran it and now production is DOWN! Join this bridgeline now and help us fix this!"
So, as the author of the code in question, I join the bridge... And what happens next, I will simply never forget.
First, a little backstory... Another team within our company needed some vendor client software installed and maintained across the enterprise. Multiple OSes (Linux, AIX, Solaris, HPUX, etc.), so packaging and consistent update methods were a a challenge. I wrote an entire set of utilities to install, update and generally maintain the software; intending all the time that this other team would eventually own the process and code. With this in mind, I wrote extensive documentation, and conducted a formal turnover / training season with the other team.
So, fast forward to when the other team now owns my code, has been trained on how to use it, including (perhaps most importantly) how to send out updates when the vendor released upgrades to the agent software.
Now, this other team had the responsibility of releasing their first update since I gave them the process. Very simple upgrade process, already fully automated. What could have gone so horribly wrong? Did something the vendor supplied break their client?
I asked for the log files from the upgrade process. They sent them, and they looked... wrong. Very, very wrong.
Did you run the code I gave you to do this update?
"Yes, your code is broken - fix it! Production is down! Rabble, rabble, rabble!"
So, I go into our code management tool and review the _actual_ script they ran. Sure enough, it is my code... But something is very wrong.
More than 2/3rds of my code... has been commented out. The code is "there"... but has been commented out so it is not being executed. WT-actual-F?!
I question this on the bridge line. Silence. I insist someone explain what is going on. Is this a joke? Is this some kind of work version of candid camera?
Finally someone breaks the silence and explains.
And this, my friends, is the part I will never forget.
"We wanted to look through your code before we ran the update. When we looked at it, there was some stuff we didn't understand, so we commented that stuff out."
You... you didn't... understand... my some of the code... so you... you didn't ask me about it... you didn't try to actually figure out what it did... you... commented it OUT?!
"Right, we figured it was better to only run the parts we understood... But now we ran it and everything is broken and you need to fix your code."
I cannot repeat the things I said next, even here on devRant. Let's just say that call did not go well.
So, lesson learned? If you don't know what some code does? Just comment that shit out. Then blame the original author when it doesn't work.
You just cannot make this kind of stuff up.105 -
A young guy I work with burst into tears today, I had no idea what happened so I tried to comfort him and ask what was up.
It appears his main client had gone nuts with him because they wanted him to make an internet toolbar (think Ask.com) and he politely informed them toolbars doesn't really exist anymore and it wouldn't work on things like modern browsers or mobile devices.
Being given a polite but honest opinion was obviously something the client wasn't used to and knowing the guy was a young and fairly inexperienced, they started throwing very personal insults and asking him exactly what he knows about things (a lot more than them).
So being the big, bold, handsome senior developer I am, I immediately phoned the client back and told them to either come speak to me face-to-face and apologise to him in person or we'd terminate there contract with immediate effect. They're coming down tomorrow...
So part my rant, part a rant on behalf of a young developer who did nothing wrong and was treated like shit, I think we've all been there.
We'll see how this goes! Who the hell wants a toolbar anyway?!401 -
OH MY FUCKING GOD!
What is the point in separating us into backend/frontend developers if everyone has to learn/do everything?
And now this FUCKING DUMBASS that is leaving!!! The company convinced my FUCKING STUPID boss to start using react with nodejs on the new platforms ...
Did anyone think about talking to the fucking devops that maintain the fucking deployments about this????
By the way, this sucker is me.
And now I have one month to: deploy a new app... ALONE!! learning fucking react (please kill me) and probably merge it in a clusterfuck of unseparated backend/frontend because fuck it.
Oh, and figure out a way to make deployment automated and easy for me at least.
I'm about to rant in real life...7 -
!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 -
*Now that's what I call a Hacker*
MOTHER OF ALL AUTOMATIONS
This seems a long post. but you will definitely +1 the post after reading this.
xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.
xxx: So we're sitting here, looking through his, uhm, "legacy"
xxx: You're gonna love this
xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.
xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".
xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.
xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
xxx: holy sh*t I'm keeping those
Credit: http://bit.ly/1jcTuTT
The bash scripts weren't bogus, you can find his scripts on the this github URL:
https://github.com/narkoz/...53 -
While working on my one of the first project in java i ended up using deprecated Calendar API for the date. Since deadline was near i thought it would be a good idea to use the JCalendar API for as date picker (which is a third party API).BAD IDEA. It was the night before the submission round about 11pm when i realized that there is no way to convert JCal object into Calendar and it turned out it is not working as expected you have to subtract a particular number from the year to get date right.
To convert JCal into Calendar i used the toString function to get the date in string sliced it using substring into year,month,day then had to assign date to Calendar object via constructor.
Had to write 70 lines of code just to convert JCal into Calendar...
And then there were other complications related to this problem. Had tu pull an all nighter just to solve date related problems
LESSONS LEARNED :
NEVER USE A DEPRECATED API
NEVER USE THIRD PARTY APIs WITHOUT RESEARCH7 -
Guys I have so much work to do, and here I am procrastinating on devRant.
Anyone else here wasting there time? :D
(not really... DevRant is too cool to be considered a waste of time) -
So, since I hear from a lot of people (on here and irl) that Linux has a 'very high learning curve', let me share my experiences with the first time my dad touched Linux (Elementary OS) without me interfering at all! (keep in mind that he is very a-technical)
*le me boots the system* (I already did setup a user account for him and gave him the password).
Dad: *enters password and presses enter*
Me: "Hmm that went faster than expected."
Dad: "Uhm I know how to login son, it's not that hard and pretty obvious".
Me: "Alright, why don't you try to open up the default word documents editor on here! I'll be right back!"
Me: *Goes away and returns after a minute*.
Dad: *already a few test sentences typed in LibreOffice writer* it's going pretty well :)!
Me: "Oo how did you find that?!"
Dad: "Well, there's a thingy that says 'applications' so I clicked in and found it in the "Office" section, do you think I am blind or something?!"
Me: 😐. uhm no but I just didn't think you'd find it that quickly. Now try to install Chromium browser! *thinking: he'll fail this one for sure* I'll be right back :).
Me: *returns again after a minute or so*
Dad: *already searching for stuff through Chromium*
Me: "wait, how the hell did you do that so quickly, it's not the easiest thingy for most people".
Dad: "Jesus, it's not that hard! I went to the application browsing thingy, typed 'software' and then a sorta software store icon showed up so I clicked it and it opened a windows with a search bar saying something like 'search for applications/software'. clicked in it, typed 'chromium', saw it coming up, there was a very clear 'install' button, it asked for my password, I put it in and after a little it gave a notification that it was installed. Then I went to that application browsing thingy again and typed Chromium. Then I hit enter because it selected an icon called chromium...."
Me: O.o. Okay this is going very good, now open an email client and login to your email address!
Dad: *goes to application browsing thingy, types 'email', evolution icon shows up, dad clicks it, email address setup steps show up and dad follows them quickly. After about a minute, everything is setup.
I expected this to be a hard process for someone who dealt with Windows his entire life but damn, I underestimated it.
Asked him if he found it easy/what he liked about it:
"Well, it's very clear where I can find everything, default browser/email/word document editor programs are easy to find and that's about all I need so yeah, great system!"
I am proud of you, dad!77 -
First off I dont mind what OS you are using. This rant isnt about the OS but about hypocrisy for some of the users. Secondly Im sorry for typos, I typed it on my phone while waking up.
People are calling Windows spyware, so they are using Linux or MacOS. Even though I disagree with the term spyware I would be fine with that if you weren't a hypocrite.
How many of the people who use Linux and call windows spyware uses Google, Apple, Facebook or Twitter once in a while? I highly doubt you if you say you don't.
A few years back Ive tried to live without anything of google, this also meant blocking YouTube, their trackers an javascript libraries.
Not much of the internet still works if you block google servers.
Google is everywhere and always collects data.
Facebook and twitter also collects data about you. Everyone who has your number in their phone will share it with Whatsapp and google so they can build up a profile. Even if you dont block it.
What I am telling you is that its impossible to avoid being tracked by these companies (including MS).
Every company I mentioned here has a profile on you, if you want it or not.
So let's check which of these companies tries to follow European laws.
Google gets fine after fine but doesnt really try to avoid it.
It looks like Apple, MS, Facebook and Twitter are doing it better on this.
But if you check the European law every European citizen is allowed to request their complete profile collected by a company. And that means complete and not the public part you volunteered to give away.
So I tried it out.
Google didnt want to give it, apple didnt want to give it, Facebook didnt want to give it and Twitter doesnt want to give it.
The hypocrisy is becoming clesr with the following. I did get my complete profile from MS. It was a messy PDF file which crashed most PDF readers.
It contained a list of people I know and how I know them. It contained MS accounts I had in the past and my hobbies. (and quite a lot more)
So from these big companies MS is the only one following the European Law.
So yes they do collect data, but they are open in what they collect.
And Im not saying here that Microsoft is great just because they follow the law.
You can have your own opinion about this and do with it what you want. I just wanted to share some, maybe alternative, facts.
And again this isn't an OS rant or whatever. I dont mind what you do, but I do mind hypocrisy.18 -
Why do people talk so much in the real world. I'm okay with yes/no questions. Talking face to face is exhausting for me. Leave me alone. I'm okay with chat too.
Can't tell these to anybody for real tho.
Sighs.7 -
!rant
Hey everyone!
I've recently made a devrant API for python!
It is available for use in your very own projects!
I am planning on using this on another project, a python devrant CLI program, inspired from a collab using JavaScript.
Here is the link: https://github.com/coolq1000/...
It is very basic with functionality, not much beyond getting rants by index starting at zero, or getting all rants available by skip, limit.
Has some documentation in the readme.
Have fun!6 -
It has come to my attention that some people on this app are not just ranting but are just bitter at everyone different from themselves.4
-
What type of a college offering computer science course doesn't have programming societies and does not care if the student know programming or not?
That's right, AN INDIAN ONE9 -
A sound recognition system
Being deaf is one major factor that's kept me from moving out. I can't hear sounds like doorbells, fire alarms, etc
I want to build a client-server solution that can be trained to recognize specific sounds [more details]63 -
"You should use Windows server!"
It was a high security project which needed to run very stable. Even the windows sysadmin looked at that guy like 'dude what the actual fuck'.27