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
Search - "sockets"
-
At university we had lessons in C++.
First lesson: Make a calculator
Second lesson: Make an application that uses sockets to connect to an FTP-server and downloads a file. No FTP-libraries allowed.13 -
/*
It's a pretty long rant. Hope you didn't get bored :P
*/
So I have this friend of mine who has learnt Python at good level (that's what he says) and is with me in all classes in college. I have worked with C, C++, C# and Java only and hated Python when it was taught (wk44).
So the following happened in the last 2 weeks:
Once he wrote a Python function in terminal just returning a hard coded string (lame right) and will show me how cool is it and that it is sooo much easier.
Whenever we do a mini project together he will force that we use Python. Even in Image processing when everyone is ready to work on Matlab, he insists that Python would be a better option.
We asked that this XYZ is very easy to implement on Matlab.
We then had to listen about the large and great community of Python and that it has Libraries for everything and that it is the greatest programming language ever.
One day he saw my C# project for DFA and NFA simulation which was the greatest project I have "completed" myself, and went like "Hmph, if I was you, I would use python and make a more "professional" code" (then went on arguing as always)
This happened today in Networking lab-
(Sockets was taught and we are expected to learn its programming aspects)
All students: Open linuxhowtos.org and start reading on socket programming
He : Opens some websites and downloads books on Networking with Python or someting
Now while I am reading the documentation of sockets and bind, he opens spider IDE, copy-paste the code in the book and start bugging ME that he is getting all these errors like literally showing me those errors and whining about all those problems.
Me: We are supposed to learn this in C. Here take a look at this link.
HE: No I'll use Python cuz it is better than your C. It has libraries for everything and is much easier.
Me: Alright whatever I am fed up, do whatever you want11 -
Do you know what's more fun than debugging multithreaded code?
Debugging networked, multithreaded code...3 -
I know a guy, about 50 years old. He is a self-taught programmer since he was young, and he has always used Visual Basic (never anything newer than VB6).
He once needed to interface with a web application I wrote, so I asked him to send me a POST HTTP request. He didn't know what I was talking about. No notion of REST, sockets, HTTP, nothing.
The he showed me his code. Actually, his codes. He had multiple copies of the project, one for each version, and he even kept multiple variations of the software in different separate folders. He probably doesn't know what "version control" even means.
You think this is messy. You didn't see the actual code (it's a huge application!).
Spaghetti all over the place. Meaningful variable names, what are they? Default names for the controls, like button1, button2, etc, with forms with more than 30 buttons and text fields. This was the most incomprensibile code I have ever seen.
You might think that this guy is just a hobbyist.
No.
He sells his applications. To companies. They are obviously full of errors, but they buy them.
Now, if you're still with me, two questions come into my mind:
- why?? I hate this, because it's impossible to prove to a non-technical person that this is *not* software development.
- how do I know that, to someone else, I am not like him? How can I be sure that I know and will know what needs to be known?4 -
In my yesterday's interview:
Interviewer: Tell me about some cool things you did on last year.?
Me: Connecting multiple IoT devices and create dashboard to show status using web sockets.
Interviewer: Oh great. You did without page refresh.?
Me: Yeahh 🙄
Interviewer: Then its cool.
Me: 😬🤔😐22 -
To those that think they can't make it.
To those that are put down by those that don't understand you.
And to those that have never had a dream come true.
Not a rant, but the story of how I got into programming
I've always been into tech/electronics. I remember being told once that when I was 3, I used to take plug sockets to pieces. When I was 7, I built a computer with my dad.
There isn't a thing in my room that hasn't been dismantled and put back together again. Except for the things that weren't put back together again ;)
When I was 15, I got a phone for Christmas. It was a pretty crappy phone, the LG P350 (optimus ME). But I loved it all the same.
However I knew it could do a lot more. It ran a bloated, slow version of Android 2.2.
So I went searching, how can I make it faster, how to make it do more. And I found a huge community around Android ROMs. Obviously the first thing I did was flashed this ROM. Sure, there were bugs, but I was instantly in love with it. My phone was freed.
From there I went on to exploring what else can be done.
I wanted to learn how to script, so over the weekend I wrote a 1000 line batch (Windows cmd) script that would root the phone and flash a recovery environment onto it. Pretty basic. Lots of switch statements, but I was proud of it. I'd achieved something. It wasn't new to the world, but it was my first experience at programming.
But it wasn't enough, I needed more.
So I set out to actually building the roms. I installed Linux. I wanted to learn how to utilise Linux better, so I rewrote my script in bash.
By this time, I'd joined a team for developing on similar spec'd phones. Without the funds to by new devices, we began working on more radical projects.
Between us, we ported newer kernels to our devices. We rebased much of the chipset drivers onto newer equivalents to add new features.
And then..
Well, it was exam season. I was suffering from personal issues (which I will not detail), and that, with the work on Android, I ended up failing the exams.
I still passed, but not to the level I expected.
So I gave up on school, and went head first into a new kind of development. "continue doing what you love. You'll make it" is what I told myself.
I found python by contributing to an IRC bot. I learnt it by reading the codebase. Anything I didn't understand, I researched. Anything I wanted to do, google was there to help me through it.
Then it was exam season again. Even though I'd given up on school, I was still going. It was easier to stay in than do anything about it.
A few weeks before the exams, I had a panic attack. I was behind on coursework, and I knew I would do poorly on exams.
So I dropped out.
I was disappointed, my family was disappointed.
So I did the only thing I felt I could do. I set out to get a job as a developer.
At this stage, I'd not done anything special. So I started aiming bigger. Contributing to projects maintained by Sony and Google, learning from them. Building my own projects to assist with my old Android friends.
I managed to land a contract, however due to the stresses at home, I had to drop it after a month.
Everything was going well, I felt ready to get a full time job as a developer, after 2 years of experience in the community.
Then I had to wake up.
Unfortunately, my advisors (I was a job seeker at the time) didn't understand the potential of learning to be a developer. With them, it's "university for a skilled job".
They see the word "computer" on a CV, they instantly say "tech support".
I played ball, I did what I could for them. But they'd always put me down, saying I wasn't good enough, that I'd never get a job.
I hated them. I'd row with them every other day.
By God, I would prove them wrong.
And then I found them. Or, to be more precise, they found me. A startup in London got in contact with me. They seemed like decent people. I spoke with their developers, and they knew their stuff, these were people that I can learn from.
I travelled 4 hours to go for an interview, then 4 hours back.
When I got the email saying they'd move me to London, I was over the moon.
I did exactly what everyone was telling me I couldn't do.
1.5 years later, I'm still working with them. We all respect each other, and we all learn from each other.
I'm ever grateful to them for taking a shot with me. I had no professional experience, and I was by no means the most skilled individual they interviewed.
Many people have a dream. I won't lie, I once dreamed of working at Google. But after the journey I've been through, I wouldn't have where I am now any other way. Though, in time, I wish to share this dream with another.
I hope that all of you reach your dreams too.
Sorry for the long post. The details are brief, but there are only 5k characters ;)23 -
On a tiny vacation in another country. Don't have a converter plug (for the power sockets) so borrowed one.
*connects laptop to charger* (old charger which might die soon)
*nothing happens*
*slight panic*
*tries different sockets*
*nothing*
😨😲😭
"you might want to check your phone with that thing as the socket seems loose as hell"
*tries phone with charger that definitely works*
*nothing*
😰🙌
That was a fucking panic attack right there 😅2 -
"We should use ambiguity-driven development using co-domain model sockets, anfractuous horizontal scaling, and recursive async testing"
"What even is that"
"I found some words I like in the dictionary, and used it as the title for a medium article. I thought that's how we play the game as devs these days"6 -
So I created this really cool messaging program for my CS class in high school. Though when I say for - I mean for the students which were bored when the teacher told us how to "resize images in Word".
I used python and tkinter to create it all, and didn't even need to touch sockets. (Mostly because I didn't know how to use them back then, but also because I kept the messages in a file on the school nas.)
Anyway, the program worked and we used it every week, with me listening to suggestions and improving it each week. I even managed to create a sort of notification system.
But sadly, my teacher found out about it and shut it down.
Have you ever had a similar experience?9 -
This morning:
SLACK HAS A DARK THEME! ALL GLORY TO THE AMAZING SLACK TEAM! SLACK FOR PRESIDENT!
This afternoon:
OH GOD THIS THEME MAKES ME WANT TO SCOOP THE EYES OUT OF MY SOCKETS THE FONT LOOKS UGLIER THAN THE PILE OF SKINFAT I SCRAPED OFF MY MOUSE ITS AWFUL I NEED HUGS SEND HELP
Thanks, companies, for trying, I guess.
I love dark themes, but the ones provided are often even worse than the light themes.
They go overboard with extreme black/white contrasts, pick a super weird hue of puke-gray, or certain elements are unreadable.
So, please, instead of wasting the time of your designers on something that's clearly too difficult for them.... how about just making it easy to create community themes for your app?
Especially if it's an electron app, how hard is it to add a config option to import a CSS file, and provide one template as an example?7 -
Spent an hour trying to figure out what was wrong in my socket disconnect detection code because it was constantly reporting disconnects when it shouldn't have... Only to find it was a pinched cable causing the problem. Meaning it actually did work the entire time.1
-
I can't wait for connectors to become genderfluid.
Or someone complaining about sockets being called "female".15 -
It's Friday night, I live alone.
Little bit of vodka, little bit of light reading of channels (the django web sockets interface), NOONE running about the apartment, all is quiet.
Bliss.
-- a dude only in his 20s...2 -
There's just way too many choices when it comes to buying a new pc. And then there is Intel. Granted they produce great chips. But the whole cpu market is under their control. They are releasing new chipsets and sockets for breakfast.
We need stronger competitors4 -
Sure you know this one:
* Mobile project with realtime notifications
* CEO asks for push implemented with own sockets instead of using firebase or gcm
* Spends loads of time of money and time
* Asks to dev why It costs so much
* Blames the dev for socket implementatiom2 -
I am currently in a bit of a (well-deserved) lull at work, both of my projects are finishing up/ finished, so tomorrow should be pretty light, as the latter half of today was.
And I have really gotten interested in the HTTP protocol. It's so interesting learning how it all works under the hood.
So I think I'm going to be researching/ messing around with creating a cpp project that essentially implements cURL from the ground up, creating sockets, reading from them, parsing the HTTP requests... all that. I don't expect to actually get it done, but it should be an immense learning experience. I have a clear goal: implement this function:
std::string get(const std::string&);
Once I'm able to just GET as simple as that, I know I have achieved my goal!3 -
!rant
Just had the best moment of my career today. Myself and two of my colleagues have been working on this system (firmware, hardware, web app etc) together and after months of hard work we finally saw it all in action.
My colleague turned on a device on the web site and it updated the db, turned on a light on his board and updated the devices state on the site (we use web sockets so it's real time).
I probably haven't did it justice here but it was flipping awesome!1 -
Sat on the train to my girlfriend's house 1.5 hours away, and I'm letting a friendly stranger charge his phone from my laptop (THIS INTERCITY TURBOSTAR TRAIN HAS NO MOFO'ING SOCKETS BUT PAID WIFI) and now my computer is out I want to code.
Problem is, if I bring up vim or the terminal, I may as well bring up hackertyper and put on a ski mask, and quietly mutter 'I'm in'.
On the other side, maybe he's using his beaten up Samsung to sneakysneak into my laptop? Who knowwwssss.6 -
if you want to learn about sockets I recommend reading this guide.
http://beej.us/guide/bgnet/...
is does require some prev knowledge of unix things, but easy to follow otherwise -
Computer engineering : Insanity!!!
Today a friend of mine was assigned to make a Client-Server Encryption using Sockets. The guy did a great job applying BlowFish algorithm, but the teacher was disappointed because she couldnt map letters to the encrypted text and she declared the program to be wrong!!!2 -
So my father has to deal with some vendors providing niche hardware and software solutions for a single department in the company.
Once the hardware finishes its work and transfers results to the managing PC, the PC has to upload those results to the server on the internet. The problem is that if no one's working with that setup for a few minutes the software in the PC can no longer communicate with the server.
Naturally, since idle time is in the equation, I thought of SO_KEEPALIVE (or whatever it's called in Windows). Wireshark confirms the absence of keepalive packets. However, the app doesn't seem to have any means to enable it... Hence the need to work with support guys.
One would expect the support to be professional, experts considering anything related to the app.
One would NOT expect to receive a call: "Hey, look, I was doing some googling on the internet... You might be right, enabling KA might help with the issue. We were discussing with our engineers and we tried to find some application that could enable KA on your computer. We couldn't find anything, but we believe that's the way to go. So give it a try and try to find some app on the internet that enables KA for our proprietary application". // everything in Lithuanian ofc.
I mean...seriously...?
I was startled to hear this suggestion. Since I expected them to be experts I assumed there's something IDK about Windows sockets -- could Windows enable KA globally, by-default? Did not find such a thing. Could Windows allow application A to control application B's socket options? Frankly, I'm too afraid to even look for this. I dislike Windows already. If this turned out to be true I'd probably become an anti-windows evangelist.4 -
i'm writing a custom web server for a project (esp32 based)
each 4 connections system crashes (cannot bind socket anymore)
i was so angry with espressif thinking that was their fault (bad implementation of posix sockets)
but is mine...
today i did another code review and I just discovered that i missed a fucking close() in the websockets handler
fuck
fuck
i wasted a month on this issue.1 -
So after 7years of sound engineering, I started working as an intern in a startup company which does "anything" for money.
( Sending me to a seminar for taking photos of our customers is also in the list. )
Yesterday, I managed to grasp the basics of node and web sockets to build a simple chat app in order to satisfy boss' needs for a small website. He wanted to add it as a feature and assigned it to me as a task but it turns out nobody has any idea about putting it online. Seems like I still have lot to do.
Thing is, this is my 3rd month and I already started making no sense to anyone when I try to exchange information about coding/programming and latest technologies which we should encountered long ago. I am happy to experience and learn different things but I am feeling really alone.
I would like to take this opportunity to thank you all for boosting me with amazing real life experiences and supporting my career changing decision even without knowing.
Have fun ranting!1 -
I'm the kind of person that says "Fuck python, worst language, fuck C#, Java, Golang", assembly and C are superior.
But I have learned my lesson; Yesterday I learned enough C# to be able to make a windows app that connects to a another app via sockets. I tried first to do it with C++ but my app looked like shit and took me about a whole day to make. Then I tried with C#, got the App working on an hour, now I'm delighted with C#. I guess I have to be open-minded.8 -
Manager: client is breathing down our necks for that sockets interface. Wrap up any last minute changes, fix the documentation and get everything posted!
Me:*does all the things.*
That was two days ago. Client hasn't even logged in to download the software and the documentation.1 -
Why do I program everything myself in C, even a rest service? By writing everything yourself in C you make simple things complex to make complex things simple.
Writing a rest service for example learns you a part of http protocol, how sockets work, how to create a parser (in this case json). Three thing's you would miss if I used python.
On top, your rest service uses WAY lesser resource than written in python for example. Especially for CPU usage.
Allocating and free-ing still often have issues there, but I consider it a skill problem / discipline issue. Not blaming C for that. The rules are clear.12 -
Last time, working on a project with two mates at school.
I'm the one who knows how to read and understand correctly a doc for low-level c libraries (portaudio, opus) and working on sockets.
I make the barebone of our server. Co-workers should work on socket client.
After a week, the socket client is ugly, and almost unusable.
I rewrite the socket client in two days.
Co-worker, for a week : "the only contribution of Orionss is deleting my code" (it wasn't the first time)
In these moments, I would like to kill this guy1 -
Small update to this rant
https://devrant.com/rants/1789703/... :
A classmate of mine lend me his old laptop with an SSD and an HDD and I could install Ubuntu Budgie on it and use it while my laptop is under repairment. The thing is, this temporary laptop is pretty awesome and fast and the fact that I don't have to deal with all the NVidia proprietary drivers and other gaming laptop bs makes me pretty happy
Update to the story above: the HDD of the temporary laptop died (didn't have anything important on it, so no problem). But I must be going through some bad omen tech times, since, beside my laptop and this HDD dying, my cooking plate, inflatable mattress, some sockets and lightbulbs broke inside my apartment. Hail! -
Guinea pigs are not from Guinea and they aren’t pigs
JavaScript has nothing to do with Java
Computer science is not an actual science
Lawsuit is not an actual suit that the judge wears
Siouxsie Suioux is not Native American
Sugar gliders aren’t made of sugar
People don’t drive on driveways and don’t park on parkways
Carpets have nothing to do with either cars or pets
Gunpowder actually looks like noodles and not like powder
Coca-Cola has no coconut and no cocaine in it. It also contains no cola nuts
Peanuts aren’t actually nuts
Watermelon doesn’t taste like a melon
Laptops are usually used while standing on desks, not laps
GPU, as in graphics processing unit, can process things that aren’t graphical
Silverback gorillas’ backs ain’t made of silver
Rod Steward is not a rod and not a steward
Guy Standing can sit
People who say they can’t stand something usually can actually stand up
People who call themselves woke do sleep sometimes
Hibernation mode in Windows doesn’t actually hibernate anything
Kool Aid can be served hot
Wall sockets can be used while not being attached to a wall
WC is not a closet
MrBeast is in fact human
Dodge cars aren’t better at dodging things than other cars
Some AC units can be operated using DC
Most men don’t menstruate
Pop bottles don’t always go pop
Backpack can be used while not being worn on your back
Watches don’t watch anything
Some keyboards aren’t actually a single board
Cigarettes have cigars, but cassettes don’t have cass, and Gillette doesn’t have gills
Dyson doesn’t make Dyson spheres
Hairdryers can dry things that aren’t hair
Beds aren’t usually made of bedrock
ThinkPads can’t think
MacBooks aren’t books
Ceilings don’t ceil
Platinum records aren’t made of platinum
Training doesn’t always involve trains
Great Britain ain’t that great
HDMI can carry signal that isn’t HD
Fingers do fing but autists don’t aut
American Football band doesn’t play american football
Taylor Swift is neither a taylor nor a swift
Hard disk drive doesn’t drive
Tank tops has nothing to do with the top part of a tank
Tea bags do sometimes contain herbs that aren’t tea
Tea isn’t usually teal
Jack Black isn’t black
Fingernails aren’t nails32 -
4 and a half years doing socket/network programming and I only just learnt my understanding of TCP was largely incorrect...
Well then... That's something...3 -
I'm a student at a cyber education program. They taught us Python sockets two weeks ago. The next day, I went home and learned multithreading.
Then, I realized the potential.
I know a guy1 who knows a guy2 who runs a business and could really use an app I could totally make. And it's a great idea and it's gonna be awesome and I'm finally gonna do something useful with my life.
All I gotta do is learn UI. Easy peasy.
I spent the next week or so experimenting with my code, coming up with ideas for the app in my head and of course, telling all my friends about it. Bad habit, I know.
Guy1 was about to meet Guy2, so I asked Guy1 to tell Guy2 about my idea. He agreed. I reminded him again later that day, and then again in a text message.
The next day, I asked him if he remembered.
Guess what.
I asked him to text Guy2 instead. He came back to me with Guy2's reply: "Why won't he send me a message himself?".
So I contacted Guy2. After a while, he replied. We had a short, awkward conversation. Then he asked why he should prefer a new app over the existing replacement.
He activated my trap card. With a long chqin of messages, I unloaded everything I was gathering in my mind for the last week. I explained how he could use the app, what features it could have and how it would solve his problem and improve his product. I finished it off with the good old "Yeah, I was bored😅" to make the whole thing look a bit more casual.
Now, all that's left to do is wait.
...
Out of all the possible outcomes to this situation, this was both the worst the least expected one.
I'm not familliar with the English word for "Two blue checkmarks, no reply". But I'm certain there is no word in any language to describe what I'm feeling about this right now.
By that point, Guy1 has already made it clear that he's not interested in being my messanger anymore. He also told me to let the thing die, just in case I didn't get the hint. I don't blame him though.
It's been almost a week since then. Still no reply from Guy2. I haven't quite been able to get over it. Telling all my friends about it didn't really help.
Looking back, I think Guy2 has never realised he has that problem with his product.
But still, the least he could do is tell me why he dosen't like it...
"Why won't he send me a message himself?" Yeah, why really? HMMM :thinking:
You know what? If I ever somehow get the guts to leave my home country, I'm sending a big "fuck you" to this guy.9 -
Idk why I had the idea to research how sockets work in X86 Assembly. I’ve just been weirdly obsessed with low level stuff recently.
Edit: and obsessed with network programming.12 -
Most recently... taking something previous devs had failed at and knocking it out of the park.
Best example was a statistical regression and graphing tool on ASP MVC.
The devs were doing a massive brute force recalculation on the server layer. It would take 24h then fail to save (Entity framework brute force).
We moved it to the database layer and got it down to a passable time.
The same devs were outputting charts to ie 9, chrome, firefox... same deal, half an hour on the initial request (parser churn in the browser)... then failure.
Again got it into a passable time by switching to web sockets and long polling then outputting 1000 or so points at a time to give the browser time to render.
Taking those two cock ups and making them a workable solution was awesome.
Since then, teaching. We have apprentices, newcomers, interns all jumping in and looking to get working. They're all different, what works to teach one person won't the next, each of them so far has caught on to what I was teaching. It's a proud moment to be able to impart knowledge and see someone pick it up, enthusiastically... it's also awesome to see someone excited about what you do. -
PouchDB.
It promised full-blown CRDT functionality. So I decided to adopt it.
Disappointment number one: you have to use CouchDB, so your data model is under strict regulations now. Okay.
Disappointment number two: absolutely messed up hack required to restrict users from accessing other users’ data, otherwise you have to store all the user data in single collection. Not the most performant solution.
Disappointment number three: pagination is utter mess. Server-side timestamps are utter mess. ANY server-side logic is utter mess.
Just to set it to work, you need PouchDB itself, websocket adapter (otherwise only three simultaneous syncs), auth adapter (doesn’t work via sockets), which came out fucking large pile of bullshit at the frontend.
Disappointment number four, the final one: auth somehow works but it doesn’t set cookie. I don’t know how to get access.
GitHub user named Wohali, number one CouchDB specialist over there, doesn’t know that either.
It also doesn’t work at Incognito mode, doesn’t work at Firefox at all.
So, if you want to use PouchDB, bear that in mind:
1. CouchDB only
2. No server-side logic
3. Authorization is a mess
4. Error logs are mess too: “ERROR 83929629 broken pipe” means “out of disk space” in Erlang, the CouchDB language.
5. No hosting solutions. No backup solutions, no infrastructure around that at all. You are tied to bare metal VPS and Ansible.
6. Huge pile of bullshit at frontend. Doesn’t work at Incognito mode, doesn’t work at Firefox.8 -
TLDR;
How much do you earn for your skill set in your country vs your cost of living?
BONUS;
See how much I & others earn.
Recently I became aware of just how massive the gap in developers earnings are between countries. I'd love to calculate a fixed score for income vs cost of living.
I know this stuff is sensitive to some so if you prefer just post your score (avg income p/m after tax / cost of living).
I'm not shy so I'll go first:
MY RATES
Normal Rate (Long term): $23
Consulting / Short term: $30-$74
Pen Test: $1500 once off.
Pen Test Fixes: consulting rate.
Simple work/websites: min $400+
Family & Friends: Dev friends are usually free (when mutually beneficial). Family and others can fuck off, even if they can pay (I pass their info to dev friends with fair warning).
GENERAL INFO
Experience: 9 years
Country: South Africa
Developer rareness in country: Very Rare (+-90 job openings per job seeker).
Middle class wage in country: $1550 p/m (can afford a new car, decent apartment & some luxuries like beer/eating out).
Employment type: Permanent though I can and do freelance occasionally.
Client Locality: Mostly local.
Developer Type: Web Developer (True web dev - I do anything web related from custom HTTP servers to sockets, services, advanced browser api's, apps & more).
STACKS / SKILLSETS
I'M PROFICIENT IN:
python, JavaScript, ASP classic, bash, php, html, css, sql, msql, elastic search, REST, SOAP, DOM, IIS, apache
I DABBLE WITH:
ASP.net, C++, ruby, GO, nginx, tesseract
MY SPECIALTIES:
application architecture, automation, integrations, db's, real time data, advanced browser apps/extensions (webRTC, canvas etc).
SUMMARY
Avg income p/m after tax: $2250
Cost of living (car+rent+food): $1200
Score: 1.85
*Note: For integrity when calculating my cost of living I excluded debt repayments and only kept my necessities which are transport, food & shelter.
I really hope you guy's post your results, it would be great to get an idea of which is really the worst / best country to be a developer in.20 -
So today I've had the idea of implementing Node.JS in Python because I love Node.JS but sometimes I hate the whole ".JS" part of it. It will be a fantastic learning exercise with TCP sockets and such, and will be good for learning the more intricate parts of Python as well.
Excited for Nodepy!9 -
I have an old manager that I worked with at an old job that got me shit canned for a failed web sockets implementation. He works at a new company and wants to talk.
What should I do?
A) I don’t trust this fucker. Ignore him.
B) Forgive and forget and try to get the job?
C) Something else.
D) SWAT the motherfucker.7 -
When I was assigned to develop my first app with web sockets. Since I fall in love with reactive programming and real-time applications.1
-
Coolest bugs: anything involving SignalR hubs. what a crazy, upside down world asynchronous web sockets are.4
-
I need to get this out there because you guys and gals are honestly the only people I can vent this to.
I’m working on a program for fun that’ll transfer files over sockets. Nothing too special. But this project is just boring me. I’m not getting any motivation even when I’m getting started. Which didn’t happen last project.
I have a general idea how I’m going to do it but I just can’t sit down and do it because I start overthinking about everything. Like how am I going to do this or that. How am I going to handle feature a, feature b, etc. And I’m just getting a headache and I’m not writing code and I’m JUST FUCKING STARING LIKE AN IDIOT. I don’t even know why it’s not inspiring me because I’ve always wanted to program a file transferring application of some kind and I still do.
I keep doing a bunch of small patches when I work on it and they work and improve it but I am hard on myself because it’s not one big feature or I didn’t work on it for hours. I’m always so fucking hard on myself fuck.
I want to do so much other stuff but I just wanna tough it on through and finish but it’s so uninspired because I don’t even feel like what the final product will feel like others. Like any service that involves transferring files I feel like they don’t function like how I’m thinking they do like I’m trying to make this function.
I feel like everything I’m making is just subpar and not good and I’m trying and I’m trying to improve but I feel like I’m not getting anywhere. And I want to learn a lot of stuff I have shit planned but I can’t get to it because I have to go through uninspired bullshit hell.
Idk14 -
Well I learned about sockets before I learned about REST so take your pick of any early project that got server data by opening a socket and requesting information that way every time a client connected.1
-
!rant
After 4 - 5 months of learning webD, I am trying to build my first fullstack web application (simple chat one ).
My stack :
FRONTEND:
Vue.js + Materialize
Backend:
Express ( handling routes )
Mongoose/MongoDB ( Database )
Socket.io ( web sockets for real time connection )
JWT
Had dreamt of this 2 months ago where I built a basic front end using html and css, and now porting it to Vue is like a breeze.
Wish me luck and let's hope it doesnot become one of the unfinished projects. ( My university semester exams are coming up , would have to complete this as fast as possible ). I am also learning DSA + STL and aim to learn basic python syntax before holidays so that I can focus my time on ML during them. It's so fucking overloaded that I have my doubts ::((4 -
tldr: my classmates suck and I hate them
We study cs in school, and my classmates are super dumb.
Here is an example from today:
The task: build an http server in python, using sockets.
My classmates: writes everything in the main function, uses try-expect for everything and every error possible, nothing works, nothing worked after a week.
Me: properly separated to different functions, used goddam regrx to get data from requests, used asyncio to make sure it can handle multiple requests at the same time, everything worked after 2 hours.
But, and here is the problem, after I finish they ask me a bunch of dumb, 'Just Google it dude' questions and they call me condescending because I get mad after the second hour of teaching them the same thing.
Once they told me:"you think you are a better programmer then us" and I just want to say this out loud: I AM A BETTER PROGRAMMER THEN THEM, THEY ARE THE PERFECT EXAMPLE OF HOW YOU SHOULDN'T DO ANYTHING AND I HATE THEM.
That's it, I'm done. I feel much better now.
PS: it's okay to suck at programming, but please stop thinking that everyone who's better than you is condescending.4 -
PSA: If you do reverse proxying stuff, prefer unix domain sockets over localhost internet sockets, if it's on the same machine (and if it's forwarded over ssh too). You can even serve HTTP as a unix socket.
Unix domain sockets don't have the overhead of IP, so generally speaking, data will flow to your other process with much less overhead.
I've recently stopped being lazy at this, and it's worth it.3 -
I didn't know why I didn't ever told it:
I did a few multiplayer projects in Unity 4 Engine (beloved old multiplayer) and I wanted to create a custom dedicated server within the Unity engine.
I created a new project and started programming. The clients even connected to the server but I couldn't figure out how to sync the world's because the blocks the world was made of existed in both projects,but had different IDs (didn't knew there were IDs).
After a bit of googling I found out that it isn't possible to sync these projects. Tired of myself giving up I tried a different route and found out that these IDs would sync of you exported them as asset pack. So I did!
And it worked ❤️❤️❤️❤️
So I could have a less power heavy dedicated within the unity engine.
(PS: I knew I just could made a server in C# or so with sockets and what ever, but 12 year old me doesn't knew sockets) -
OMFG this SAP hybris backoffice is such a disfunctional piece of shit. The simplest modification is like going through dozends of places, changing weird named XML stuff. I consider myself good at seeing the whole picture of an API ... but this ... this isn't something I would even call API ... IT'S shit, pure and utter shit.
Sockets, widgets XML, config XML, widget-configurations, definition.xml widgetcontroller .... not even the docs are clear (or existing for that matter) ... ARG !"§$%&/(O -
I'm trying to investigate why chrome keeps crashing after i implemented web sockets to a web app.
I used windows perfmon to see the memory usage over night.
The usage between 17:30 and 01:50 is expected behaviour as this part of the app is a live data graph of the last 48 hours.
Now i have to find out why the app doubles in memory twice in a hour.2 -
Setting up npm private registry and mirror is like setting up machine for handling ddos attack.
Last time I was tuning linux kernel tcp ip stack by adjusting default variable values was ages ago but if you see 100 open sockets in a matter of second after you try to install single frontend dependency you start questioning your life. -
Background: I am currently working with a DB that has websocket functionality ("notify a client on insert/etc."). However, you do have to whitelist tables in order to use them with sockets.
I wanted to optimize my code and didn't want to mess with my coworkers dev-data, therefore I duplicated the table. After improving some small things I noticed that the interface does not change with new socket data. I have spent the last hour or so trying to figure out where I broke it.
I just realized that I forgot to whitelist that duplicated table 😐 Most relieving moment today 😅
Bonus side effect: The code is much cleaner now since I refactored a lot of the realtime-logic in order to understand it/fix the bug.3 -
How to run PHP in a container :
1. Begin a docker file for an existing php cron app (when all you know is php, everything looks like a php app)
2. Set the FROM.. Apt get update .. Do composer install
3. Builds the image
4. Discover I need git
5. Add git to apt get install step
6. Builds the image
7. Launch the php script
8. Fatal : use of undefined constant SOL_UDP
9. Opens the source code of the third party. The there's no mention of where that constant is from.
10. Spend many minutes online to find what's missing.
11. Find the PHP sockets page about that option. Digs into the documentation to find out that's missing from the installed PHP.
12. Find out I need to add a step to install the socket extension in my docker file.
13. Build the image again
14. Execute it, finally it works
15. Remember why I hate php
(for brevity I've omitted the even more complex part of having to set up zlib)
How to install node js in a container image:
FROM node:8
ADD package.json
RUN npm install7 -
Amazing project I love working for and we're are the cusp of pushing out a big new update.
Suddenly Safari starts closing our SignalR web sockets the moment the page loads, and only Safari does it.
And our client has a hard on for Apple.
So it's considered a blocking change, even though Safari is only used by the client and none of our end users.1 -
Fucking pimatic.... I'm not fucking able to send just raw 433MHz signals like in pilight. Now I have to use the fucking shell-execute plugin to communicate with pilight to send the correct codes to my RF Sockets.
(Btw the pimatic-pilight plugin is deprecated so I'm not able to use it)
Fuck. But. Hey. It. Works. -
Anyone here got any experience with making a realtime chat app using laravel, socket.io, and android? Pls help before i kill myself.18
-
Does anyone else get triggered when you use the python socket .recv() and the server does not return anything so the program just stays there indefinitely? For me, I can't even Ctrl+C it so I have to close the entire window. It's especially annoying when I start a server in the interpreter (quite a bit of lines) and I have to rewrite it afterwards.7
-
Omg, freaking web sockets.. But I figured out how to run a socket server in SSL with the certificates in a root folder. Seems like an early night for me!
-
so on android you're supposed to do network stuff like sockets and http requests on a separate thread right. lazy me released an app with a line of code (i forget what it is) that allows me to make http requests in the main thread. rip3
-
Nice. I have now wasted about 8 hours or so debugging to find out why my (fully functional) program wouldn't receive messages (from an FTP server through a socket). It just received an timeout from the server after 300 seconds. Then I discovered that my messages didn't include '\r\n' in the end.
Beautiful -
Under pressure for a big feature that had to be merged into develop like one month ago. But I couldn't because of issues I discover every single fucking day.
Today's issue is that a Cucumber test fails. I try reproducing it on my machine, it fails with a different error. Apparently I need to download some 10GB database file from some company server.
Alright, let's download it. But it's damn too slow. Well, let's have lunch in the meantime.
I come back, the download timed out at basically the same point I left it at.
I don't wanna try again. Not without trying to improve things. Download speed is ridiculous. Switching from Wi-Fi to Ethernet definitely helps, I thought.
The cable doesn't work. The port LEDs are both off. Is that cable even connected to something? So I follow that damn cable throughout my colleagues' desks. I'm now doing things without even remembering why.
I finally find the other end. It is plugged to the wall. I try another plug, but that fucking LED is still off. A colleague tells me: not all the sockets are actually connected to the switch, you have to call IT to have yours patched. Stay calm, stay caaaaalm...
A small lamp turns on in my head. Maybe something in my laptop is broken. So I try with a colleague's ethernet. That fucking LED is still off. A-ha.
Turns out, the shitty macbook adapter has this Ethernet port that DOESN'T work out of the box. It needs a driver to even realize there's a port. I look for it, I find it. I finally have wired connection. It's like having drinking water again.
I turn off WiFi, I re-try downloading that fucking database.
Nope, it's still stupidly slow. The bottleneck was in the dumbfuck internal server.
FUCK.
At least I have Ethernet now.1 -
What is your Favorite library that you always try to include in your code?
1)Logger
2)Sockets
3)Error Hanlders
4)Other if so mention what is that Library
The above question is for any programming language9 -
Just spent 2 days figuring out the issue for flickering of path drawn on canvas through sockets.
Every team member had already tried to figure out the bug.
I had checked almost everything and at last I was about to give up.
I gave a try, and it worked. How, no one knows...
Just changed 'lineData' to 'JSON.stringify(lineData)'
:)1 -
Hey ya'll back with another college boi question.
I want to develop a web server akin to that of jackbox/among us. Where each session has like an 'ABCXYZ' style code, and i assume are using TCP sockets on the back end.
I'll be writing in Go cause I <3 Go and its a chad language. Anywho, am i supposed to spin up a new websocket server each time someone wants to make a room? Or do i have one websocket server and some sort of map of rooms.
gameRooms := map['id_string']clients
Anyone have any suggestions for this?7 -
I hate, hate, hate sockets! All the mysterious way they can fail. The subtleties, different API's if you switch between Linux to Mac, etc.
If the communication between (supposedly) deterministic machines is already such a clusterfuck, how do we even get sentences across humans and act as if we understood?8 -
You know it's bad when you've planned a word addon thats sole purpose is to do mail merges.
I've done guides and shown people how to do them. Still comes to me the bloke in IT to do a simple mail merge because googling it is too complex.
It's going to be epic it will hold their hands let them know they are bestest cupcake out of the whole batch.
The progress bar will be a rainbow and each button will sparkle. Because If I get taken of my dev work to do another fucking mail merge I'll probably quit on the spot.
And I do not have the savings readily available to hold me over until I got a new job.
Knob sockets the lot of em.1 -
I am slowly turning my home into an automated smart home, however. I have found a lot of responding devices (media players, sockets, etc..) but no trigger devices (buttons, sensors) I can work with.
Am I looking in the wrong place or do I really have to build something myself using arduino?
My setup is the following: I have a central server in my home that hosts a bunch of docker services that all server a certain purpose. All smart devices have static ips so that server can address them quickly. So it is capable of controlling many things. However, now I want to trigger certain actions through a hardware button. It seems I cannot find such a device....
Any other hads on here?6 -
I know this is not StackOverflow but is there a way to send TCP packets using JavaScript? I can't find a pretty solution. Why I can't find an API like "sockets" from Python to JavaScript?
Telnet API will be fine too.
Thanks!3 -
Keep going into application level timeouts and insufficient number of xml messages frames transmitted through tcp sockets.
Found that a "custom" C-written xml parser needs 10 seconds to find the core data within 2500 chars of that xml.
I knew that C is blazing fast but that's until it's used by some dick head.2 -
Purple eye sockets and slightly wrinkled eye pouches when I smile. This is what a developer job gets me after all those hours of frowning my face at bugs all day.
Coding is affecting my health.
No, no, no, this has got to improve. I'm going to make sure I look better this year.2 -
!Rant
Just spent almost an hour trying to figure out why my computer won't display on my tv monitor (because the best smart TV is a PC). I tried everything, unplugging the graphics card and using the motherboard, tried another tv, tried different sockets. Tried another graphics card etc.
Eventually, without notice, after plugging it to a regular PC monitor, it started working. No clue why. But it works now so I'm happy. -
To marry a woman means,
to really bind that sockets.
Keep the idle rates low on this one
and ping a lot.2 -
I just learned Serverless.com
Thats it?
Shit was 100x more easy to learn compared to the brutality of terraform devops reactive streaming kafka rabbitmq sockets and other shits i had to fuck around and find out.
Dont even have to watch tutorials for this. Just building 1 simple crud project and read the docs was enough.
However after deploying these serverless shits to aws Lambda i noticed that it takes quite some time for the api to fetch response. Why?
On postman calling the route for the first time i have to wait like 3s for api to fetch all (with limit of 10) or create 1 dto object. Then every next api call is 100-150ms which is ok. But it could be better no? Locally my spring boot rest api takes 3-7ms of load time. Why is this 100-150ms?20 -
Being a university student who is about to complete his first year, is being a google certified mobile web specialist worth it?? ( More about my background : I have been into front end developement for around 4 months and this has been my first exposure to " production level coding ". I have been improving my JS skills and am currently learning Vue. I have a fair understanding of backend and am trying to build a full stack app using express, Vue and sockets . I have an interest in algorithms , dsa and machine learning although I an not able to devote my full time on it but hopefully would be able to do it in 2 to 3 months. I also have an interest in Linux and all. ). Please suggest something . Thanks in advance.
PS : I know my interests are very random , but I am just exploring my options and being a freshman , I am confused A lot . So trying to figure out something that will help me in future too4 -
wrote dumb threading and sockets system to make a bunch of https calls
extracted the working code into nice objects and methods to make it look sane and so I can re-use the code for more complex functionality that builds on itself
now suddenly the threads are locking and not multi-threading anymore
turns out?
the http(s) library expects the tls / https thing in an Arc / atomic reference count
but despite Arc being literally intended and designed for threadwork it seems the library in question throttles / locks itself if they are all using the same Arc (I don't even know how that is possible?)
if I clone the tls / https thing, no throttle / lock issues 😒
why did they even try that lol, they didn't test?!
I really didn't expect to be better at multi-threading than others already. I'm newbie. pls6 -
!!rant
Just spent a week creating a distributed api architecture which I found out won't work due to a singular issue which can't be solved - not unless I hack stuff to a degree where I might as well write my own frameworks.
I've been aiming the user application's requests towards my wsgi, which based on a custom header will proxy it towards the correct api. Each customer base has their own api and dataset, but they all visit the same address.
I've handled CORS manually, just picking up when there's an options request, asserting the origin, then returning the correct headers. Cool everyone's happy. Turns out, socket.io includes session id and handshake info as part of their options preflight, which I can't pair with my api header (or cookie, for that matter) which means my wsgi doesn't know where to send it. You get a 400! You get a 400! You get a 401! </oprah>
So my option is to either roll my own sockets engine or just assign each api to a subdomain or give it some url prefix or something. Subdomains are probably pretty clean and tidy, but that doesn't change having to rewrite a bunch of stuff and the hours I spent staring at empty headers in options preflights.
At least this discussion saved me some time in trying to make it work. One of my bad habits is getting in those grooves of "but surely... what the hell, surely there's a way. There has to be"
https://github.com/socketio/... -
Okay so anyone experienced working with networking or VOIP applications are welcome to try to help me figure out a few questions I have.
1.) How do VOIP applications like Discord and Skype not have to require you to port forward before use?
2.) If I wanted to do stuff with sockets over the internet the user of the application would have to configure a static IP Address. but when Im using Discord, or a multiplayer game, or literally anything that requires connecting to people I dont have to configure a static IP for those applications but I do for mine?!?
3.) Is there any additional information I should learn about whilst trying to make my networking application (File Transferring application) work? or any links/PDF's I should check out?
These are kinda just things I haven't found answers to, and I didn't know where to ask.14 -
Threading gui's and sockets...
What a painful day...
I honestly hate python dependency hell.
Started coding in python 2 months back, currently working on a distributed alarm system using rpi3's spent the whole day figuring out how to use it all without them all crashing into one another...1 -
Over the last week I've slowly grown to fucking hate IMAP and SMTP. You'd think after so many years we'd have come up with better servers to manage email but no we still rely on fucking decades old protocols that can't even batch requests.
To make things worse I need to attach to IMAP through node and that has been a nightmare. All the libraries suck ass and even the ones tailored towards Gmail don't work for Gmail because Google decided one day to fucking out the header at the bottom of some emails and split into mimeparts. Also why the fuck is fetching email asynchronous? There's no point at all since we requests are processed line by line in IMAP, and if the library actually supported sending asynchronous requests it wouldn't require a new object to be created for each request and allow only a single listener.
Also callbacks are antiquated for a while and it pisses me off that node hasn't updated their libraries i.e. TLS to support async/await. I've taken to "return await new Promise" where the resolve of the promise is passed as the callback, which let's me go from callback to promise to async/await. If anyone has any other ideas I'm all ears otherwise I might just rewrite their TLS library altogether...
And this is just IMAP. I wish browsers supported TLS sockets because I can already see a server struggling with several endpoints and users, it would be much easier to open a connection from the client since the relationship is essentially:
Client [N] --- [1] Server [1] --- [1] IMAP
And to make the legs of that N : N which would fix a lot of issues, I would have to open a new IMAP connection for every client, which is cool cause it could be serverless, but horrifying because that's so inefficient.
Honestly we need a new, unifying email protocol with modern paradigms...8 -
So X410 supports hyperv sockets, kde plasma runs like real smooth over one, thought we were destined for laggy desktops forever
-
I'm working on broadcasting changes in a SQL Server db using web sockets, but trying to not install anything because then I'd have to get our DBAs involved...
Spent hours trying to package a little node app that broadcasts the changes as an exe using nexe, realized for the most part it just compiles node from source, and the outputted binary didn't end up running, anyway.
Then it hit me; I can just run the node exe without installing it. Now I just have to get this service broker to work... -
I wrote about Java sockets and networking a few weeks ago. As a follow up, how would you manage state in a scenario with a server and multiple clients? A few solutions I've thought of:
Making the client and the server share a common class that makes the both of them know what can and can not be done.
Having a "Message" class which will contain a static method for parsing a received payload and return a Message instance with intent and methods to resolve intent (i.e. sending data to the client).
Perhaps both concepts should be used, or perhaps none. I'd like to hear your ideas :)8 -
Trying to get a multi container setup using nginx (also in a docker container) to work with web sockets. There's a chance that the load balancer will also cause issues later. And the front end uses nuxt, which will probably also cause issues once we turn server side rendering on as well.
This is not really something I've studied deeply before.
I'm not having fun.1 -
Anyone with good understanding of hardware and/or an operating systems network protocols please assist me. I have questions
When using socket api I know it’s not the actual sockets sending the data but the socket api tells the network protocol to send, receive, listen, connect, etc well what I want to know is how that networking protocol works within the operating system
My second question is more an extension of the first. After the operating system knows what the socket api wants to do and wants to do it how does the transmission and receiving work on the physical layer within the hardware
Idk if what I’m asking makes sense. But if anyone also has any resources or a link that’ll help me on the subject I’d appreciate it. I haven’t found anything on the subjects myself19 -
Actually looking forward to work tomorrow, a colleague spent last week implementing web sockets to our communications server, this week I now start to strip out all of our Ajax polling (in some cases it is polling every 150ms) and replace with web sockets!
After three years of asking and waiting I can finally remove the last annoying bit of code from our software 😄 -
Disclaimer: I haven't done much research.
Do you have any good course / tutorial / guide to using Web Sockets with PHP or Node? I'm looking forward to knowing about the matter but I'm just asking here before just in case someone has a good / recommended resource.7 -
I am working on an embedded system, a microcontroller-based design. The system has an Ethernet port. I am using NetX framework in the microcontroller firmware.
The DHCP Client is executed properly, an IP address is assigned correctly when connected to a router. I connect a laptop to the router using a LAN cable. Then TCP sockets behave the way they should, UDP broadcast behave the way they should. The only issue is, when I connect a Laptop over wireless to the same router UDP broadcast are received on application on Laptop, but data sent is not received on the embedded device.
Any idea why?
Platform:
Laptop is Windows
Embedded Device: Renesas S7G2, NetX framework.4 -
When you're so busy with work that you haven't had time to shower in a week, your eyes have purple sockets, you've had 20 hours of sleep over 5 days and you've missed an entire week worth of e-mails.
-
Question about sockets in java. I have one socket server and multiple socket clients connected to that socket server. How to communicate between socket clients when they connect to same socket server? Is there some neat library to handle that socket server/client interactions? Googled for hours cant find a decent solution14
-
Fuck the sockets.
Fuck the secure sockets.
Fuck that CSP rule in our proxy conf.
Fuck the self script hashed.
After fix everything....
Fuck THEIR proxy that didn't allow wss.
PS iheartsockets! -
So, as per usual, I am not sure what I am doing.
I want to make multiplayer games on the web using web sockets.
But of course I want there to be multiple game servers for horizontal scaling (I'm gonna hit it big)
Specifically for either Node.JS or ASP.Net (or both) how could I manage such a thing where there are 2 servers and 2 users. User A is assigned to server A by load balancer, and user B is assigned to server B. But they play in the same game?
Best I know of so far is to connect both game servers to a redis backing. But this seems like a convoluted way to communicate. I would rather have them both route to the game server (Whichever server the game starts on)17