Details
-
AboutCS Engineer
-
Skillsjs, Android, Java
-
LocationBangalore
Joined devRant on 12/15/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
Learning and working on a project built with purescript (fp).
Wrapping up my brain to think functionally and understanding it to implement is like rewiring my brain. I sometimes have to literally sleep on it, only to go through the concepts again the next day to get a little more insight than the day before 😝
Functional concepts are abstract af, but it sure does give you wings to liberate you from conventional way of things. -
Just saw a repository with branch name - 👶
bitbucket gives this - git fetch && git checkout 👶 for checking it out,
wondering how would anyone checkout this branch without copy pasting the above line from the web xD8 -
Converting server time to any given local timezone is a pain in the ass.. at least in JS.
Here's what I've got:
convertNowToTimezone = (localOffset) => {
let d = new Date();
let millis = d.getTime() + (d.getTimezoneOffset() * 60000); //convert server local time to UTC millisec
d.setTime(millis - (localOffset * 60000)); //convert UTC millisec to required local time
return d;
}
where I pass localOffset as -330 (IST offset).
Works in chrome console but gives a diff of 4min in the server side nodejs I'm running it in..
🤬🤬😡😡😡😡😡9 -
Was interested to learn React native, started with the demo project too. But then *bam* Flutter shows up with butter smooth UI and it's all new features.
Well, now I'm in a dilemma as to where I need to direct my 'learning bandwidth'. I'm a huge fan of JavaScript, it's my fav language. Also Dart feels lot like JavaScript.
What do you guys think? Any suggestions and experience are welcome..2 -
Waiting for 3 more ++ feels like a loooooonnnnnggggg time...
https://devrant.com/rants/1367635/...4 -
Story of childhood me learning about pointers in C.
Thinking of writing cool stuff like a virus that deletes all the programs loaded in the RAM, crashing the system:
void main() {
char m = 'c';
char* p = &m;
while(true) {
*p = '';
p++;
}
}
Later learned that OS allocates guarded memory for each program. ;(3 -
Trying to debug why there's NaN% instead of 15% (project in JS).
Later realises isNaN(Val) literally checks for NaN datatype rather than Val is a number or not.
*shit*
Ctrl Shift F - isNaN in Atom (searches entire project), rethinks logic, refactors code
Looks around *no ones there*
Silently pushes the changes along with another major commit.