Details
-
Aboutlow-level minded guy, who has so much hidden flames I dont know even where to begin. Hit correct point and you can see volcano.
-
Skillsphp
-
Locationdig @resolver1.opendns.com ANY myip.opendns.com +short
-
Website
Joined devRant on 5/8/2019
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
-
Writing simple driver for AT24C256 eeprom on pico (RP2040)
It turned out it was FT24C256A, which should follow same protocol.
After literally over month of coming back to it, getting stuck again, rewriting things (including some functions of pico-sdk), i almost gave up a d started just yolo trying random shit.
Afterall the documentation on addressing the chip fucking missled me -_- (1st bit is r/w flag and 2-7 bits are address, counted from MSB->LSB)
I made it work yesterday.
In meantime Ive rewritten Wire library, Ive modified someone's else rewrite, extended sdk to allow getting i2c registers, tried to use tiny go just to learn it doesnt support i2c slave mode, resoldered entire thing few times, measured connections few too many times etc.
Frustrated I doubted I will ever manage to finish putting this project together because it looked like Im just too noob.1 -
So it's been awhile since I switched from PHP to Golang.
At first I missed PHP a lot, but golang really has some advantages, so its fine.
But over time, and when the project grows in features, I more and more and more start to miss more and more at least basic classes / inheritance and abstraction friendly stuff from php.
Im finally reaching the point where I start to truly miss php, I can't stop myself after writing a feature to think how much less work that would be in php.
Call me crazy, but damn, it's real.14 -
partially tech
Is it just me or every single time* I call to some support after first 30 minutes I really want to ask question "can I talk with someone competent?". And no disrespect to these guys, many people call in with simple stuff, but damn, I try to solve stuff on my own and call in only when I need someone who actually can get somewhat technical and have some knowledge about the product/service/smh. Infuriating.
* one hosting provider proven to be exception. -
Golang code review be like
> oh no, you used prohibited `else` keyword
Context? Dosent matter. Its banned, mkay?
Fix? Oh you know its hell to read now22 -
Sometimes hardest part of being dev is staying calm and trying to explain someone why something is a BAD idea, than see being ignored and just silently prepare fix so when shit goes south you can quick fix shit the other dude/dudette fucked up regardless of number of warnings.
Sigh, another dumpsterfire of this variety incoming.5 -
Today I got bug report on code that I thought was fairly well unit and manually tested by me while I was writing it.
What happened:
Our QA was testing other feature and asked someone to deploy into his env other branch, without these changes, and reported that this feature is just straight up not working at all.
That report was kindda big deal1 -
2 weeks+ ago I made a PR into our codebase containing sample refactor that streamlined a significant portion of code. Also, I did refactor only on two handler packages (for MVC folks, that's Controller) as proof of concept, to figure out how convinient / logical the part would be for everyone.
We have rule of 2 approvals for merge (for 5 team members)
While writing refactor, it obviously blown up a lot of unit tests, but still coverage was fairly poor (that stuff was rushed, there was back than no time for unit tests). After my refactor I spent couple of days writing tests that hit fairly sweet (comparatively) coverage. (I managed to bump coverage from low 20s to high 80s, and have less code for tests)
I got first approve pretty much immidietely, other team member was on vacations, and 2 of them forgot.
We generally try to close PRs fairly quickly (usually same day kind of deal), but that one was just.. hanging in there. So I pinged everyone to re-check it to greenlight it but of course, loo and behold, merge conflicts arised. I ended up fixing actual logic (just some method signatures changed, not a big deal) and ran the units.
So, one of that handlers got quite a few of edits, and guess who is pretty much rewriting unit tests for second time now...
Dude, sometimes I question why tf I even bother with these tests... Feels like sabotaging my productivity, especially with bullshit like that3 -
Hi fellow ranters,
Its been awhile since I last was here posting stuff..
So, I've commited to my effords getting shit done in golang. And I met a lot of painpoints, and I mean...
A
Lot
Of
Them.
Anyway, most of them are solvable by changing mindset or having some macros set up for no-one-fucking-wanted bloody boilerplate code that is omnipresent fucking EVERYWHERE.. **cough**
Steering back on what I want to rant about.
We with our team have one major problem with golang. There is no standard for docs in code...
Like, Fing legit. Everyone uses notation for closest to theirs heart language, so you get inconsistent-as-fuck notations for parameters / function descriptions.
We have functions that look like
//doSth does something
and also
// doSth
// @Summary does sth
// @Description does something but in more words
// @Param
and so on and so on
And trust me Im getting mild example.
Why this language does not have A F...ING (well defined, using proper definitions) STANDARD YET?
EDIT:
bonus context: We decided that too much of our code is undocumented and we go through efford of documenting it, but everyone sees it differently, and we can't agree on one single standard... So we decided to not refuse PRs due standard, as well, nobody would ever had PR accepted3 -
μRant
Normal languages for longer ifs:
if ( (condition1)
|| (condition2)
|| (condition3))
Go:
if (condition1) ||
(condition2) ||
(condition3)
That OR at the *end* of line deeply disturbs me10 -
So,
Im coming from PHP. I feel comfy around PHP.
I needed for other project GO lang (there is no library for what I need to do in PHP, and it's low level thing anyway)
I need dependency that is in form of modules.
Okay, so importing it (just writing import "github.com/blah/blah/v3/blah" as suggested in docs did not work. something something, not found)
Some googling later, I created go.mod file.
And all the hell broke lose. So I am trying to fix that using random stack overflow, IDE highlights entire project on red, go complains it can't find "./" while it looks for it in gopath not project files and claims it's remote repository.
Among other WTFnessness after adding go.mod it suddenly stopped fetching ANY dependencies (including stuff like github.com/pkg/errors ), so, that's fun...
I added go.mod before 9 AM.
It's 13 and Im still wrestling with this
I fail to connect the dots why go lang get's so much praise for it's apparently awesome or something package managment... I find "composer install", and have pretty much guarantee it will work, much easier to wrap my head around.
[edit]
forgot to mention that Im literally starting to learn go. Just cherry on top5 -
So we have outsourced one of systems (i dodnt had enough time to do it myself)
I know, i know, i could finish there.
We all know that there is a possibility if you need to add timestamp to table to know when row was created. Its worth mentioning its table used to count money.
So we have that thing, vouchers, and of course they have expiry date on them.
Orginal authors vanished (bielarus or how its in english, they have ongoing shitstorm, so i understand) and I needed to make a small adjustment.
So ya all would expect that field 'created_at' which defaults to current_timestamp() would be... Well current timestamp, of creation of record, right? Riiiiight?
WRONG.
Their hacky solutions INC decided its great idea to make that date of expiry, and current timestamp on use.
Becouee fuck logic and clarity.3 -
Why exacly PHP contains "T_PAAMAYIM_NEKUDOTAYIM".
Yes, I googled what that is, I understand message, yet still it strikes me if PHP creator was high that night and later figured T_THE_DOUBLE_COLON_THING_OF_MAGICK is not what he aims for and out of wtf'ness temporarly forgotten english?
And what is your theory on that8 -
µRant
Doing a little bit of javascript and php at same time.
Im sleepy.
I am looking for function in JS that is bugged to fix, but accidently opened php file instead.
It took me hot minute of annoyance that I cant find darn function I am looking for.
time for coffee or sleep for once.7 -
We all know, that youtube suggestion feed + music just plain sucks. But.. seriously?
For the record - it's been 3rd time Im listening to this track, in a row, just focused enough I didn't notice at first.6 -
So yeah, apparently i am supposed to take part of 'meating'.
I would love to say its joke/meme but no, not really, that happened.6 -
Okay, so, my company does some stuff around blockchain. I had source for smart contract prepared before and it was on 'todo' queue. So, time for it, time to deploy on Kovan, time to test it on actual chain. Riiiight? Okay compiled no problem, deployed, no problem, i plug into several gui's ABI provided by compiler, and... Well..
I still do not understand why each and every gui prompted me to send view transactions (external view), instead of, well, eval them locally, i checked the ABI manually, it is correct, i stripped it down, it is correct, all up to spec.
I try older version of offline MEW, to have older web3.js with no success that thing works properly.
Every
Single
Web3.js based client
Behaved
Differently
And none behaved correctly.
I would, like, understand, if I didnt use official compiler, but official compiler should for F sakes be compatible with official client.
Today this stole 6 hours of my life, I didnt manage to solve it, and I am legitmitely pissed.
Im getting close to re-implement segment of web3JS to be able to do the tests I need to do.
Its not like I havent done it before.... -
Okay, so...
We have backend app written in phalcon 3.4.
I got task to prepare new test enviroment, based on ubuntu 20.04, php 7.4 and 'copy-paste' our Phalcon backend there.
Soooo.. That backend was outsourced and I have exacly 0 Phalcon expirience.
Phalcon 3.4 does not support php 7.4
Last 2 days Im tearing my hair out to port it over to Phalcon 4, with honorable mention why the fuck memcache didnt just want to work, and finally its working.
Now Im taking the heat that making new test enviroment takes more than few hours.
Fuck off, let me do this shit, and understand its not just apt-getting dependencies for fuck sakes.2 -
I don't deal with it. I just believe my code is trash and everything is trash and as long as it works well and noone has to touch it, it's fine, so I pay extra attention to making my code work well for sure. I pay extra attention that it can be hosted on literal potato and I do a lot of defensive programming. Also every single crash dings my e-mail box so I for sure notice if something goes wrong.
I know Im far from perfect but that's how I deal with it. I believe Im at least good enough to do my job.1 -
So, as you may be aware, I work as solo dev for small company. There is easly enough work for team, but I digress..
So, they wanted to stay updated whats progress on some projects. We use slack. I use git. I set up account for them so they can come into my git and controll if issues are solved, etc. I wont get started about any dev ever beeing judged by how much code is outputted, beyond scope of this.
So they started bitching about that git is too technical and too complicated and shit. They made bizzare bullshit google excel (not even in polish) and stupidass form to "audit issues". Hmm.. wtf. I just didnt use it becouse it was slowing me down and was just frustrating, how one can replace git + issue tracker with fucking spreadsheet?!
Okay, so having that aside, I complained about that so they were like "okay, so you want to use git and we want to be notified. whats your solution" me "oh, you want to stay notified, thats easy, I can plug my git into slack"
Now our slack is spammed to oblivion with git notifications.
Now they are annoyed that they are too notified. (Yes I consulted with them what will be plugged into slack)
Oh well
¯\_(ツ)_/¯2 -
Fuck my company, sincerly.
So Im crunching my ass off, to make product, there is +- fuckton of changes that for example require refactoring flow of certain things, restructure of how shit work, Im +- 2nd weekend now, and most heavy features are cleared.
I work till late. constantly I have someone with stupid shit like calls, indeed Im needed for that stuff but also, that slows down progress of this project. Just sake of example friday 18:00 I had call (I work till 16:00) about new minor and frankly easy feature. Today, morning 8:30 one call, than 13:00 long call, Ive done the feature, didn't push it to alpha. yet though.
Now during that call that started 13:00 I get yelled on that all ordered features aren't on prod yet (I throw them to alpha becouse manual tests must be done as standard here).
Dude what the motherfuck. Im literally wearing my ass off to deliver your stupid product becouse I know its critical for company but it does not mean I can do it all in one fucking night.
F**k off and shut your mouth up and let me work for f**k sakes.
Ah also, stop f**king remotely micromanage me you little piece of sh*t.
Thanx for allowing me to vent out,
Peace.2 -
Yay, nothing better than good ol' change request... Right?
Let's see...
Limit user's ability to do sth, if this condition is met, allow editing global parameter of this condtion, than add per action overrides, on top of that add per-user override, on top of that add per-user overrides to ignore certain overrides.
Shiit man, reading this took me 3-4 times and still Im not sure if I 100% understand
Okay, I think I got this.
setting
per-user ignore flag to setting
override to setting
per-user ignore flag to override to setting
override to override to setting
per-user ignore flag to override to override to setting
design assumption: automatic system that can make life easier
me: designed system to be fully automatic
every single change request: be less automatic, require more user manual and more attention to work2 -
My buddy needs website, I helped him to setup localhost, and told him I can work on backend if he wants, he is my good friend so I could even do it for free if he shares some income later down the line but he would need frontend anyway, so someone would need to do it. Some consideration later it turns out that there is noone to do the FE, so that is trashed and instead Im solving wordpress problems for him whenever he has them..
God... I forgotten why I hate wordpress... Every single time I helped him I felt like Im doing workaround to workaround and it somewhat works like its supposed to...
Edit: fixed wording11 -
Managment...
Where do I start?
So I have a task they set to priority "P0 - drop everything". Okay, dropping everything, doing the thing.
It's 11 and I already had 3 calls and meeting...
GOD FUCKING DAMINT LET ME WORK ON THE THING
and please let me focus -_-.
Oh, oh, also, calls were like "hi, we have a really dumb question to you, we know we could sit down for 10 seconds and use so-called logic but calling you is easier." Oh and also whats the progress on this P4 task?
holly motherfu... eghm. I mean.. They really like to piss me off. Best part of call #2. I prompt them "hey, please message me on slack, it does not destroy my focus and allows me work more efficiently"
and response... "I prefer talking than typing"10 -
My story about ego boost was when client came one day that they want some system that was prommised to him but guy who promissed him it forgotten about it.
Well, i quickly estimated things in head (i wasnt on meeting, was next to this room so i heared whats up), i pulled out my boss from meeting ("hey i need you urgently for sth") told him that i can make proof of concept to show him for next day (it was +-15) and sure enough, next day 10:00 first version that worked but was kindda rough around edges and with TON of technical debt was created. Than I told client that I just need a little bit more time to work on this as he can see it is here, it works, and it does what he needs, but it would be good to add some polish to it.
He bought my version and i saved company a client, that was lost becose some moron forgotten about him hah
Oh, yes, i got all i needed in return, day off and some extra $$ -
Ahhh, this kindda makes me sick...
Wrote something.
Wrote documentation - 2 weeks.
Changed few things and refactored - 3 days.
Refactoring and updating documentation - week and counting.3 -
About browsers and whole SSL CERT thing...
Most likely everyone here noticed, that https site with broken certificate will throw these big red warnings, in your face and there is so much wording like "ITS NOT SECUREEEE" or "ITS HACKEDDD" almost like it was written by passionate fanatic.
But when you are on plaintext http browsers reaction is like ¯\_(ツ)_/¯
Even if you have plaintext with password, it will for example in chromium put small little red thingy that almost no one notices.
I believe that broken cert with some error like invalid date is MORE secure than plaintext password, yet still there is this hypocracy with browsers...
I dont say that broken SSL cert is good, or something, Im just pointing out contrast of "broken" https vs plain http.... One looks for casual Joe like end of the world is coming and second is bearly noticable. Da fuck?
I disagree with this approach18 -
Today I discovered first thing I personally prefer in JS over PHP.
let's say you have:
//pseudocode
if(sth){
let ret = 1;
} else {
let ret = 2;
}
if(sth_else){
return ret.toPrecision(2);
}
return ret.toPrecision(8);
In PHP this will work. JS will throw up becouse it managed to separate scopes. Its actually what I would like to be the case with PHP.22 -
Unit testing is cool and all, but FFS...
If you want unit test - cool. But its not drop-in replacement for functional testing!
I believe each release should be manually tested.9