Details
-
SkillsPython, Java
-
LocationWarsaw, Poland
Joined devRant on 5/25/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
-
I use gnome because I'm Linux noob and cba to play too much.
Anyways, Lenovo ThinkPads have prtscr key next to altgr (right alt, but for locales with diacritics it makes characters with those diacritics)... I was recently focused trying to write up some bug fixing stuff... And missed my key.
Damn, this flash and sound almost gave me a heart attack.
___
BTW, it doesn't flash every pixel... It only flashes the captured ones - so if you learn to screenshot only window you want (alt+prtscr) and they're not fullscreen, it's not as bad. :) -
Switch to Python, use namedtuple to inject several named parameters as a single object to the function. ;)
Or just use an object in any language for that. One object is one parameter... But then you probably have a more-than-3-parameter constructor. -
Use Python, then you literally get a dict and list structure identical to the json...
-
On the producer's website, there are several big clients listed. You know, that kind of advertisement "those reputable orgs use us". It's scary how many big companies and universities use that bad product.
Or maybe it's because the product itself isn't that bad, just the API... And I assume you can't see API documentation before purchasing (as I said, I couldn't find it anywhere, coworker probably got it from our client).
So the problem only starts when you have to dig in the API. When it's already too late. -
@balvinder294 this also happened today. A junior made a template for notification emails for a script. He sends me a changed version, I send the test notif, it looks like the change didn't went through... I didn't upload the file. I downloaded it, noticed the vpn connection broke, fixed it, logged onto server and run the script. But I didn't upload the damn template. Oops.
I know I need to automate such stuff, but I just migrated computers and I never start things without a plan, so I need to plan how to sort the projects (how I did it on the old computer is confusing af) and manage the scripts... Etc. So I haven't automated it yet. My autistic mind gets in the way... -
Oh, that's me.
Fix the bug, check the console... Try fixing it again.
Oh, wait, did I even upload the files to the server? Of course not.
And I'm wondering why it doesn't work after the fix... -
Also, I use vim only for edits on remote server. That means I have original files on my local machine.
And git, of course. -
Why don't just quit without saving changes...? `:q!`
-
@Wisecrack In the US, 40% of working population is one paycheck away from poverty.
Read about wage/economic slavery.
When you work your ass off in bad conditions and get less than value of your work, it's slavery. Period.
I know many companies that look at people like disposables. I don't deny that. But good company treats people right.
As for (2), you obviously don't hire just anyone, duh. Disposable employee culture makes you hire anyone, pay them shit, and then replace them. But when you go for quality, you seek specialists in the field and people with potential. First short-term contract to see if you judged them right.
Disposable employee culture made people contact me over half a year after sending in a resume, because they needed student labour for summer, lol. They had junior dev listing up when I sent my resume, but they didn't even message me "thank you, maybe later", and now they were calling me and expecting I'd happily join their shitty workplace, lol. -
And I'm sitting here at home during normal day,
after texting my mentor (we have pretty flat hierarchy, so he's not my manager but he's my senior and we work together closely) whether I can work remotely today
because I'm not feeling well...
And he told me sure,
and to take a day off if it's bad...
Like, my work's philosophy is you treat people right, because
1) they are fucking people, not slaves,
2) happy employees mean good quality work,
3) when you invest in people, you want them to stay... -
Old. I didn't bother with it. Happens every time I report spam/scam comments.
-
"Implement this data structure you learned at uni and don't remember by its name" is a shit, not a test
Seems like companies want to imitate Google and others.
But Google uses practical issues and interviewers look at problem-solving techniques, how the person thinks (looking at edge cases, going back and seeing their own mistakes), NOT at remembering some strange structures.
[When I was younger I was at "talented young" group meetings at Google, MS, and Facebook. They talked about those whiteboard tests a lot, to encourage us to apply to internships and later to work.] -
@asgs
Do you really want to know?
https://www.efficientip.com/
Check some of their clients...
Their API documentation isn't easy to find on their website, but their python lib has fragments - eg https://gitlab.com/efficientip/...
Btw, their python code has quality similar to that of their API... -
@Lor-inc I don't need injecting, I have write account for this. :P... But I haven't tried this because it's my company's client company.
However, that API is not our client's or other small company's fault. It's a big product used by thousands of companies. 😱😂/😭 -
I feel you. I used API that had in it's docs that it's "REST-like, not RESTful"... :x
Guess what was the parameter in GET...
...
...
THERE WAS A FREAKING "WHERE" PARAMETER. -
<looks at own left index finger which still has a scar after a deep cut with sharp af knife>
Excuses.
Are you touch typing? (For those who don't know: touch typing is that "correct" way of typing when index fingers are on the bumps and you don't really move your wrists at all.)
Only then you would have real problems. And if you're using qwerty anyways, you're moving your hand a lot anyways, so typing other way won't be hard.
Hell, I even gamed with my hand after a few days. Had to do most of my movement with mouse and it hurt like hell if I forgot about that finger and used it.
Generally: I tried to keep that finger straight, so I don't even touch the keyboard. But you can attach something to your finger from the nail side so you can use it partially for some keys. -
@gitlog Yeah. It's some kind of professional training for companies and probably rich brats (I know that "coding bootcamps" are for rich non-technical managers who think that coding is cool, I had a friend who worked as a tutor in one of those; this thing of mine at least required some prior knowledge of Python).
I work mainly in Python but I'm self-taught so my company thought it would be a good idea to sent me to a certified training course (and of course pay for it; if I were to pay for it, I wouldn't do it). One of my coworkers was here last year and he recommended this course...
So here I am.
So far it's not very bad but it could be better. Other people surely learn more than me because they take more time with practical exercises. I only had one struggle so far - with some modification of the exercise I though about and wanted to test it. I talked with the tutor for a moment about the theory behind it and now it works.
Next days will be more interesting. -
@kamen Not their job?
It's their job to look professional if they want to earn money.
It's not like this is some rented room in a conference center.
They have an entire building that belongs to them where those training courses happen. Trainings that cost €250 for a day and last several days. -
Why?
E.g. for list comprehensions where you would need to repeat stuff in result and in if part.
Or in normal ifs, to check whether something exists, and assign it in the same line. -
Logic behind this is that compilers optimise stuff and evaluate things in different order.
C/C++ theoretically does right-to-left if it were e.g. passing parameters to the function. But this is addition. So which order is correct? Probably neither, because of those optimisations. Check different optimisation parameters in gcc.
Java looks like doing the normal addition left-to-right. (pre-incr) 5 + 5 (here post-incr to 6) + (pre-decr) 5
Python doesn't have ++ and -- because of syntactical ambiguity and that problem with what comes first. -- is double unary minus, so it doesn't change the value. + is unary as well. So you just do a+a+a there. -
@AleCx04 Nobody says it should go into prod.
It's mostly for the learning process.
But also:
Have you ever had student colleagues/interns who either do something but take a lot of time or don't do anything?
The thing is, instead of doing something "bad" at first and going further, then going back and fixing the bad thing, they pause at one thing they can't figure out. There's no code at all to fix. Not even to test parts of it.
Because they got stuck 20% through the thing and instead of leaving it/doing a bad thing for the time being (and fixing it later)/askibg for help, and doing the other parts of the project.
It's the thing "10% of the project takes 90% of the time", but you don't even have the remaining of the project.
It's more like "10% of the project takes 10% of the time, next 10% takes 90% - you have only 20% at the end".
When it could've been 70-90% at the end with bad/no 10% chunk in the middle that someone has to fix.
I prefer the latter. -
I sit on StackOverflow half of my time, using questions and answers as general learning resources or answering questions as simple coding exercises.
-
@aviophile Because that advice has been around for some time and I know the fallbacks for being a perfectionist (I.e. I am also guilty of the last line, "don't look at my code!").
The context is pretty clear if you look at that last line, not only the advice. -
@Prutser Sorry, *Uses Signal protocol. Now it's correct.
What I meant, it's really end-to-end encrypted and not stored anywhere (even encrypted with the key only known by the device).
As opposed to Telegram, which I already cleared for her like that.
I mainly use Telegram, so I know its quirks. I also use pure Signal - but I have it as my default messaging app, so it's like normal texting. -
@irene Yeah, but iterate is different from "drop everything, you can't make it good at first" or "try to perfect this one line over and over, while you haven't even started on anything else".
Treat it like premature optimisation - first do a general thing, then correct some stuff. Iterate, as you said yourself.
School and even school-level programming competitions teach us that we should perfect everything just as we create it or sometimes don't even start if we haven't perfected the idea. My country's national programming olympiad dropped that idea year after I graduated - before you had to optimise from the very start because you only got points for the whole group of tests and they liked to group nice tests with some one edge case or very huge data...
This left me a bad programmer.
And it was one of the reasons I eventually chose a polytechnic instead of normal university - I knew uni taught theory and that premature optimisation. -
My partner's mum asked me to retrieve something from her phone. All I ever did before was being patient with her and help with changing some basic settings so now I'm the IT person for everything, instead of my partner (who never helped her with computers anyway)...
So, I told her I can't do that, if it's not it some kind of trash (some phone galleries have those, hers did but it wasn't there)... Maybe if she sent it to someone, the file is still there.
That was a mistake.
She has both Telegram and WhatsApp. I forgot WhatsApp is based on Signal, so it doesn't store anything on the server.
So I used trick from telegram - delete storage for that user so it will reload the media... WhatsApp told me it will clear the media for that user, it cleared whole history. And then I remembered it's based on Signal, so it won't download any history because it doesn't store one.
I think I won't be asked to fix anything anymore. 😅 -
Guys, the first one doesn't say "write bad and unreadable code, as long as it works". 🙄 It means, "don't let your mind discourage you from learning, you don't have to get everything perfect the first time, you'll learn better techniques with experience, just do it and then correct it".
Seriously, my first python script is bad - it's still readable but I do a lot of things kinda manually because I didn't know a useful lib for the task back then and some language tricks. (I had programming experience, just not with Python.)
Now I know my way around that lib, inherit from its classes for easier comparison between systems, do a lot of one-liners with dict/list comprehension... -
@IAmAnIssue Understood too well. :) My partner's calculations for his thesis run on a several computers raised a temperature a few degrees Celsius in a room. It was a good heating substitute in winter.
-
Tell them it's so hot that the bot broke and you need $$$ donations for a cooling system. ;)
-
I have no idea what you mean?
I only press NumLock because I actually use my numpad. And I write some parts of my passwords with CapsLock, but most of the time it isn't after plugging in a new keyboard.