Details
-
AboutI create stuffs
-
LocationIndia
Joined devRant on 6/3/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
-
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 -
Got really pissed off writing a stored procedure the other day because the reason behind it is absolute bullshit.
Gave sproc to QA for peer review before release.
QA: why are the variables called @FuckThisShit and @ThisIsBollocks?
Whoops, guess I was more angry than I thought 😂3 -
When you have to do some live coding in front of highly technical people during a presentation, and the coding Gods decide to take away all your typing skills.2
-
FB launched profile picture guard feature recently for Indian users ( well, we Indian men deserve these kind of publicity. -.- anyone being on Indian forums knows what I am talking about )
Anyway it claims that othersa CANT download your profile picture. But. I just did inspect element and found the image and saved it (and deleted of course. This was for research purposes). How effective do you think this can be?19 -
The "explain x to an x years old boy/girl" questions are easy yet tricky.
Interviewer: Explain machine learning to an 8th years old kid.
"Imagine if <insert anecdotal example here>"
Interviewer: The kid is asleep. Try harder.4 -
Maintain your LinkedIn, write little articles about implementations on a tech blog, check issues on popular github projects and make PRs, create a portfolio website. Register as a company and do some freelance work, even if it's just a cheap website for your grandma's knitting club.
Do the tour/tutorial of every popular language/framework. Learn the basics of react/vue as a backend dev, learn some sql as a frontend dev. Set up a vps server at DO or AWS, host a few small services. Fullstack is bullshit, but communication is key in development, which means you need to know about the whole playing field.
Recruiters can be useful, but knowing developers in your area is even more valuable. So especially if you're unemployed, go to hackathons, conferences and meetups.4 -
Every time I got a mandatory security question, I type in "go fuck yourself with a cactus". There's only one answer for all of them.6
-
I came early today to the office
Found the office locked
Need fingerprint of Project Manager/CTO
With my mouth saying ah.. i blew hot air into the finger print sensor, 5 to 6 times
There u go.office door opened with welcome message
just hacked the system
Genius me11 -
Stolen from an awesome book but my new favourite line ;)
Someone: “Can you repair my computer, it`s not working anymore?”
Me: “Do you call Leonardo Dicaprio when your Tv is broken?”7 -
Started part time job at a company, had to log my time on timesheets. Said fuck this and now the whole company logs their hours on a custom web based time logging system which I built.5
-
- If I buy x amount of ram | hard drive space | cpu power I will never need more.
- No need for version control | Tests. This is a small project
- git commit -m "changes" (its a small change. I will remember why I did it)
- It is too obvious that I put a lot of personal time in this so my boss will definitely notice!
- Why comment this simple method? Anyone should know what it does. Especially me!
- "this should never happen"
- This call can't be from work. Everyone knows I am on vacation.
- I will back up next week. It's not like it is going to crush today.
- It’s 11:30 already? I will work on this for only a half hour more and then I will definitely go to bed!
- This project will take x amount of time!2 -
Dear Android studio,
When u require an update please tell me u require an update.Do not pretend u can't open jdk folder or shit like that ...you could find jdk yesterday u can now
Sincerely
Me
(Frustrated insomniac)1 -
That weird moment when you write a Python script and errors pop up everywhere, only after an hour of debugging (pulling hair out) to find that you started putting a semicolon at the end of each statement again.3
-
[ ] be humble, but not unconfident.
[ ] Step out of your comfort zone. Don't apply to a job that is exactly like your last one.
[ ] A good team is the most important thing for a developer. Intelligent, and nice people to work with and to learn from is more important than the salary difference between jobs.
Try to 'feel' for a good team. Ask to be introduced or to look around when you finish the interview.2 -
When your boss schedules you for training all week, then asks you why you're in training and gets onto you for not doing your normal tasks... ??? I don't know what I'm doing...!1
-
That weird moment when you don't understand what ++ or -- means in devRant cause you Python developer15
-
Possibly the best comment I have ever encountered:
//When I wrote this, only God and I understood what I was doing
//Now, God only knows3 -
Saying that Java is nice because it works on every OS is like saying that anal sex is nice because it works on every gender.7
-
Friend: So you're a programmer? You must be good in hacking WiFis and sht.
Me: Uhm..
Friend: Can you hack my PayPal account using HTML?
Me: Say no more.13 -
Boss: “Do you think you can work on Saturday? We really need the help.”
Me: “Yes, of course.”
Boss: “Great, thank you.”
Me: “I’ll probably be late, though, as public transport is slow on the weekends.”
Boss: “Okay, when do you think you will be at the office?”
Me: “Monday”.17