Details
-
Aboutcoder, lecturer, firebender, chunibyou
-
Skillsjs, php, python, java, sarcasm
-
LocationMalang, Indonesia
-
Website
-
Github
Joined devRant on 9/9/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
-
!rant
This week, I worked on my side project. The basic idea of this project is to let everyone build software components in their favorite programming language without any need to learn any complicated protocols (such as CORBA or whatever).
It already worked good enough for some stand alone cases, but recently, I build a web app based on it.
So far, I write the code by myself. But I guess the project won't be as good as what it is right now without any help from everyone. Some fellow developers in real life and in devRant (especially @plugsut) really help me in order to write a better code. And I'm grateful for that.
Below is the specs of my project:
URLS:
* Repository: https://github.com/goFrendiAsgard/...
* npm: https://npmjs.com/package/...
CREATING BOILER PLATE:
* Install Chimera-Framework (`npm install --global chimera-framework`)
* Create web project (`chimera-init-web <your-project-name>`)
RUN THE SERVER
* `npm start`
PERFORM TEST
* `npm test`
TECHNICAL SPECS:
* Database: MongoDB
* Programming Language: Javascript + CHIML
* Supported Programming Language: CHIML + virtually any programming language.
TESTING RESULTS:
* JWT Authentication: Fully tested.
* REST API with Whitehouse API standard (https://github.com/WhiteHouse/...): Fully tested.
* Total request performed for testing: 27
* Total assertion: 92
* Total testing time: 7 seconds
* Average response time: 217 miliseconds
TODO:
* Write documentation for fellow developers
* Create GUI for mere mortals -
# The Darkness Triplet
- spacemacs
- spotify client for ubuntu
- postman desktop version
Everything is good, but the memory consumption is insane...8 -
Riding a fixie is like creating web application by using C.
Tiresome, and you only do it for fun and exercise.
This one is not a pure fixie however. It has torpedo brake mechanism.6 -
[Want to Ask]
Hi people...
Some times ago I read about ikigai (http://theviewinside.me/what-is-you...). Yet I'm still not sure what I want to do for the rest of my life. I'm a teacher. I love teaching programming. But lately I'm not sure anymore.
I know, this `ikigai` or `purpose-of-life` thing would be very different among individuals.
In case of you don't mind, and in case of you already find a single thing answering these 4 questions:
– What is something you love doing?
– That the world needs?
– That you are good at?
– And that you can be paid for?
Please, share your answer by commenting this rant.
Thanks!!!5 -
I have just discover codecov (https://codecov.io) and it is awesome...
mocha, istanbul, and codecov are just perfect (at least for now).
Now, I know what `codecov` badge in some popular github repo really means.
I really wonder, how this `istanbul` actually work. It looks like really understand about the test and see which line of my actual code that wasn't covered by the test...13 -
Okay, almost all are failed.
Statistically speaking, I might not be fit in a team-work thing.
Usually I end up doing everything, or do nothing.
There were two worst team-work I've ever experience.
The first one: Several years ago. I was just graduated from the college. My friend suggest me to work at a small software house. The boss was a jackass in my point of view (probably I was a jackass too in his point of view). He was very reactive and eager to change. Any feature he requested will be disposed the next day. Merely because he had a better idea. There is no priority scale because all of his idea are equally important. So, after several years, we have a terrible argument, and I leave the unfinished project.
The second one: Someone ask me to be a part of her team. She had similar characteristic to my former boss. Better actually, because sometimes she still want to hear my opinion. The thing I don't like from her is her spiky working schedule. So, no one do anything for two weeks, but on the weekend, suddenly she called. Told me that the deadline was in three days. So, after a few thrilling coding experience, I leave the project.
I'm aware, it's not fully their mistake. But I learn something from them.
Nowadays, when someone ask me to be a part of their team or something, I'll analyze their personality, their working rhythm, etc.
So if you are an empoyee-wanna-be, it is important to assess your employer. Make sure that you can work together and you will be able to find peace at your workplace. -
Do any of you ever try to create two instance of monk manager and apply different set of middleware on them?
I have a hypothesis regarding to `why it doesn't work`, but I can't find any solution.
I post the more detail question in stackoverflow (https://stackoverflow.com/questions...)
I will be happy if any of you can give any solution or any statement/question that can lead to the solution.
Thanks in advance2 -
Client: I have 1024x768 resolution video. Please show it on wide screen. Make sure it's full-screen, don't change the dimension, and don't crop it...
Me: What? But how?...
Client: <start-to-think-very-hard>
[The next day]
Client: About the feature I request yesterday, I guess it is impossible.
Me: Yup, I know...9 -
Apparently my students prefer PHP than Python. So, for today's Information Retrieval class, I show them how to do IMDB web-scrapping by using pure PHP and regex (no external libraries).
I really hate doing regex in PHP. It is not standard. but here it is anyway: https://gist.github.com/go…/...
Web scrapping (or regex in general) can make your life easier. Yes, it is hard to master, but it is indeed very useful.7 -
I love to take notes in markdown format. I use markdown for almost anything. I even write quiz for my students in markdown.
It is really painful to copy-paste so many questions & answers into moodle. To be honest, I hate moodle UI. But it is the most popular and easiest solution for e-learning.
So I spend some minutes to curse moodle, 2 hours to build a program to convert markdown into xml. And another 1 day to make LaTeX and image works.
I still hate moodle UI. But at least I don't need to deal with it for a long time. Just import the xml, create the quiz, and done :)
Ah, the program was written in Python. I really miss the old time when Python was cool, and javascript was nothing without JQuery....
No promise, no callback, just code it and run it :)14 -
Unit test works, unit test works... commit it, push it, take screenshot of it, and go to sleep... peacefully...4
-
Okay, closure doesn't work that way. Has expected this to be happened, still trying just to make sure....7
-
When you don't like the answer, you just simply vote down without giving any appropriate reason.
This is not my answer. I also understand that some people really hate JSON.parse(JSON.stringify(thing)). But giving vote down without any explanation is like throwing error without any error message.
The worst part is: that kind of attitude is perfectly normal...11 -
So, I still hate the de facto two spaces standard in javascript. But I guess I have to compromise. At some point I should also write code for fellow human.
The trick to make it still readable is: don't write more than 3 level deeps branch/loop. It is okay for live coding in the class, it's not okay to put it on github....1 -
Find this in 9gag.
Gonna share it with everyone.
To make fun of muggles who never use LaTeX or Markdown :) -
!rant && !dev
So, this real-world friend teach me about dui so yesterday. I guess this thing is applicable in virtually anything. Thanks for teach me...
The point is don't overdo anything. Keep a sane amount of effort, even for coding....1 -
Looking into the source code of safe-eval. So, despite of it's name, safe-eval doesn't use eval at all.
vm.runInNewContext
And it's gonna be funny to see some people start to think, "oh it's not eval, it's not evil then" :D :D17 -
So this is a simple calculator I created by using react native. Pretty useful.
However, if you see it on google playstore, please give a negative rate on it. And if you have accidentally install this app, please uninstall it and re-implement your own javascript parser instead.
A very critical bug was found in this pitty app. Everything works well, but it has this line in it:
safeEval(userInput)
Please don't install this app, or it will corrupt your soul. Again, please create your very own javascript instead, because you are a demigod-developer loved by PSR and any other standard.
For me? Oh I'm a wreck stupid script kiddies who use eval that too lazy to create a so called clean solution...
Also, this funny ecma script foundation put this eval thing so that you should not use it ever...
I heard a similar funny-but-ironic story about a Supernatural Entity who put a pity apple tree in the garden of eden, so that, everyone eat it's fruit become pricky mother fucker who never listen at anyone's argument. They blindly follow everything told by the linter. Because the linter is a perfect entity who knows your use case more than you.
And I'm really sorry, I'm just a sad moron script kiddies, please -- this rant and tell me again why eval is evil.
Because I'm too stupid to understand the risk of using eval, even if it is safe-eval. Also, tell me again this safe-eval is not save if I accidentally put global context as argument. I don't do it, but let's consider this possibility as bug...
No, mother fucker, you are not superior. You are just an asshole trying to act cool. You say something is dirty, and you don't provide any cleaner solution. Why? because you are a knight with shining armor. A certified developer who never goes to real battlefield. It is always fun right?, to see how people doing things "wrongly" and make fun of it without doing anything...
Ah, don't worry, you don't need to know how to do things correctly. You only need to pray to your linter 12 times a day in order to feel superior...5 -
Eval is evil. I heard it often. So apparently, they put it there just merely to test you, whether you are a sinful coder deserving eternal damnation or not...
So, one thing I don't really like from people is sometimes they just believe in things without questioning anything. And worst... sometimes they get offended when some random poor guy ask a sensible question regarding to the belief.
Just because Richard Stallman said vi is evil, then they hate every vim users in the world.
Just because this easy-but-effective solution is not PSR-3 compliant, then they ditch it at all...
Ok, back to the eval-is-evil thing.
Yesterday, I show some part of code using safe-eval npm package to someone. And the reaction is like "yike... it's eval..."
So yes, eval is evil. But only if it's miss-used, just like anything else...
The drawbacks of eval are:
1. Security. Sometimes people miss-use the eval by allowing user's script to be evaluated without double checked. The problem here is not eval-is-evil. However, sometimes your user is. So how about creating powerful ionic-based calculator to evaluate javascript because you are too lazy to create that infix-postfix parser? I don't really like when people argue without argument. Something like "I don't know, but eval is evil and it is". Why? why? and why?....
2. Performance. Eval is slow. Yes it is, because it is running a parser inside a parser. So it is just a mere calculator. And yes, it is slower 100 ms than native program. Problem?
3. Untrace-able error stack. But again, you just use that eval once. And if it is trowing an error, just catch it and let the user know that his input is wrong. Problem?
No, there is no real problem here. It's just eval is evil and it is...10 -
!rant && thankYou
It's me again, some days ago I'm upset by some comments in my rant. Well, not anymore (thanks for additional caffeine doping).
Some comments in my rants are related to "idiomatic" javascript. @plugsut even kindly provide the link to airbnb standard. I'm not 100% happy with that standard (and I still have my own opinion), but I've learn some lessons.
They write some things about how to deal with common use cases, and also there is linter to told me which one of the code is "suspiciously-bad-written".
Some things like `this is a string and this is a ${variable}` or {{anObject}} still doesn't work on my current version of Node.Js (The last time I checked it was LTS, but I'm not quite sure with that, probably things has been changed as always).
I also try to refactor my big functions into small chunks and incredibly, it makes the code easier to trace. Giving a sane name to function/variable is still very difficult, and sometimes I ends up with getChainWhichIsThisKeyRepacedByThatKeyInCaseOfThis(). Meaningful, but what is that again?...
I've also try to build my own "testing" libraries. But apparently there are already a lot of things out there, like mocha or something.
Building everything from scratch is my bad habit since the first programming language I learnt was turbo pascal, and back then internet access was difficult. So yeah, I build everything from scratch just to find someone has already build a better one.
This devRant thing is mostly about ranting. So it is very common to see complains like "I am a little pathetic good little boy trying to survive in this cruel universe where everyone but me is sucks".
But today (and only for today) I'm not ranting, and want to show my greatest gratitude to all of you.
Ah, and I'm not showing you the code this time.3 -
F*ck, for the sake of Zeus, Odin, Cernunos, and Linus Torvalds... Why the hell is 2 spaces become standard...
Okay, maybe I'm an idiotic non-idiomatic rebellious jerk or something... I don't care, I'm going back to 4 spaces. That 2 spaces things really hurt my eyes, and that f*cking linter keep telling me, "it must be 6 spaces, not 12".
Don't they ever think why we no longer use 1024x768 screen anymore? Wtf with torturing yourself to save that extra 16*n bit for every line in your file where n is count of indented indentation...
Whatever, just wtf...
https://stackoverflow.com/questions...24 -
So, apparently I have start some heated discussions about idiomatic javascript or something.
While it's nice to have standard (and probably a linter), I guess creating an idiomatic javascript is not as easy as creating pythonic code.
IMO the reasons are:
1. Python has Guido van Rossum. The one and only dictator telling us what's right and what's wrong
2. Javasript has airbnb standard, mozilla standard, and some open source standards. Strictly take one of them, and your code will be non idiomatic. Cherry pick some styles and combines the ones that makes more senses for you, and your code become non idiomatic.
3. The language is changing. Very fast. Put your idiomatic code in github, leave it for a while, and it's become non idiomatic. So I don't know, but this kind of code, is idiomatic, but takes some times to understand what's going on
anObject = {someFunction, someOther, someKey: someValue};
At the end, I guess the point of those standards are providing one correct way to do something. The consistencies.
I understand it is an important aspect. But this started to be religion...
Like someone really get offended if you doesn't end your code with semicolon.
In that sense, why the javascript foundation (or something) allow a statement to not being end up with semicolon at all?
Also, this is a never ending debate: tabs or spaces? two spaces or four spaces?
This is going to be ' ruby' vs 'python' thing again. I don't know about nowadays ruby, but back then they said the biggest advantage of ruby is you can approach something by using different ways and they are all corrects. Not sounds so idiomatic for me.
Ah yes, I heard almost everyone love javascript and hate php despite the fact that devRant was built on top of php stack. Just FYI, that much hated inconsistent language has something named PSR. And how about javascript? I never heard JSR or ESR. Just ES5, ES6 and in near future ES7... Which are simply provide new ways to do things, add more enthrophy to this already-chaotic-universe.
Also. In vim, how the hell do you define basic indentation based on file type? I really think 4 spaces is just beautiful. But apparently, only python coders think the same. Rest of mortal out there use 2 spaces. Somehow it hurts my eyes, yet it is the standard right?
goddammit... looks like I'll spend more time learning about what idiomatic javascript really is, debating with some zealot thinking they worship the one and only true standard, rather than solving the actual problem...1 -
Last time I post my need-to-be-refactored code, I see some mean-but-useful comments.
Everyone's comments are like: "Look this stupid coder trying to be clever and write an idiotic code, let's bully him because we are better".
Ok guys, sorry for hurting your eyes, but please do it again...
I really want to know your opinion, especially on the part where I try to make the "if condition" more readable by defining some boolean variables.29