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 - "pthreads"
-
Soms week ago a client came to me with the request to restructure the nameservers for his hosting company. Due to the requirements, I soon realised none of the existing DNS servers would be a perfect fit. Me, being a PHP programmer with some decent general linux/server skills decided to do what I do best: write a small nameservers which could execute the zone transfers... in PHP. I proposed the plan to the client and explained to him how this was going to solve all of his problems. He agreed and started worked.
After a few week of reading a dozen RFC documents on the DNS protocol I wrote a DNS library capable of reading/writing the master file format and reading/writing the binary wire format (we needed this anyway, we had some more projects where PHP did not provide is with enough control over the DNS queries). In short, I wrote a decent DNS resolver.
Another two weeks I was working on the actual DNS server which would handle the NOTIFY queries and execute the zone transfers (AXFR queries). I used the pthreads extension to make the server behave like an actual server which can handle multiple request at once. It took some time (in my opinion the pthreads extension is not extremely well documented and a lot of its behavior has to be detected through trail and error, or, reading the C source code. However, it still is a pretty decent extension.)
Yesterday, while debugging some last issues, the DNS server written in PHP received its first NOTIFY about a changed DNS zone. It executed the zone transfer and updated the real database of the actual primary DNS server. I was extremely euphoric and I began to realise what I wrote in the weeks before. I shared the good news the client and with some other people (a network engineer, a server administrator, a junior programmer, etc.). None of which really seemed to understand what I did. The most positive response was: "So, you can execute a zone transfer?", in a kind of condescending way.
This was one of those moments I realised again, most of the people, even those who are fairly technical, will never understand what we programmers do. My euphoric moment soon became a moment of loneliness...21 -
I told a guy to implement an algorithm in cpp. He wrote this weird 600+ lines of code which contains only global variables and void functions then I told him to make it object oriented and he just put all those garbage in the class and gave me back and on top of that class name is Template and file name is template.cpp. I don't have words to describe his code. May be this picture can help you understand my state. Oh, if you think this matchOn_r1, r2,r3 are different then you are mistaken they are just different with one argument (one global argument). This is just part of the code. He has this shit all over the place. Why the fuck this kind of people exists?13
-
Fuck this shitty C ecosystem! Multible compilers, one standard complying, one hacked toghether? Only one GPL poisoned standart library, with no real chance of switching it, which prevents me of making staticly linked programs? And then there is microsofts compiler, with fucking ANSI support. Thanks. No dependency handling. Concurrency? pthreads. Are you fucking kidding. JSON? Have fun finding something static. Compile times where you can read entire books. Segfaults without one helpful info, so you have to debug with prints. And every library, every tool, installer, compiler, stdlib, anything is poisoned by GPL. But hey, its fast. And efficient. After you spend many slow and inefficient months developing something. I am so done with this shit.
Well.
Tommorow i will continue working with C on my backup project.
Did i mention that the stdlib has no features? Not even threading? Which is IN THE STANDARD?8 -
Why the f*ck do you want custom cursor on the site? It's annoying when suddenly your cursor changes from default. If that's not enough they are increasing size by 2-3 times. I understand if it's a gaming site or web game but why do you want to put this crap on a business site? No need to change the cursor for branding. That's stupid.2
-
Fuck Java because java is one of the worst first languages you could pick. In the following I’ll highlight two main issues. One issue, the complexity of Java, will make life more difficult for you immediately, and the other, the danger of developing myopia regarding programming languages and their capabilities, has the potential to hurt you for many years to come and possibly your entire career9
-
A guy asked on an online channel of programmers about buying a laptop and here's the perfect guide from an experienced programmer.8
-
I just built PHP 7 with pthreads... from my phone. I can't believe how far we got with the technology
-
A JavaScript developer want to understand my 1000+ lines pythonic python code without any prior knowledge about python and he just want to understand it so that he can translate it into js. What should i do?19
-
Today, I found this in our upstream repo. How the fuck does it even get merged?
No use of tempfile, instead of idiomatic it's idiotic. I have changed that system, now I am hoping i don't have to refactor thia shit.11 -
I have started a freelance full-stack project with some existing code-base and it was horrible. They only have API endpoints for fetching whole data. No limit, No sort, No filter. They are doing all this shit on the front end. They are even aggregating data on the front end. Seriously who the fuck does that? On top of that the guy who has coded it was a senior developer. I am wondering now, did he write that kind of code purposefully or this kind of shitty devs actually exists?2
-
Why the hell every IT/CS professor teach pattern codes like pyramid, star and many weird kind of designs to do on console? just why? Why don't teach basic implementation Problems which are really going to ask for SDE jobs in most of the companies.8
-
Online Multiplayer Mafia party game built on Ethereum.
Project Type: Existing open source project
Description: I found that most of the blockchain game projects in this space are using traditional web2 technology for hosting gameplay. So, we decided to create a game that utilizes web3 technologies as much as possible for our project and create services like real-time chat, game rooms, player profiles that can be used by other games. These services are very common among modern online multiplayer games and we need a reliable and scalable alternative that uses a web3 tech stack. So, we have decided to create a game that incorporates all these features.
Blockchain smart contracts development is complete. I need help in backend and frontend development. You don't need to have any experience in Blockchain.
Tech Stack: Express.js + React.js + IPFS + Solidity
Current Team Size: 1
URL: https://github.com/cryptomafias/...
Note: We are eligible for a grant from the protocol labs - the company behind IPFS.8 -
I have participated in a hackathon this weekend and one of the theme of hackathon was blockchain and being a blockchain dev i have created a DApps which follows token standard and other security standard but our UI was kind of basic cause we didn't have any designer in our team but one participated team's UI was far better than us but has serious flaws in the smart contract and guess what they are the one being selected and that's not it there wasn't a single judge who has basic knowledge of blockchain.I was using DApp term very often while presenting our idea and one of a judge literally asked us what is dapp? I mean WTF? Now i am regretting why did i participated in this shitty hackathon? On top of all that they juat give a single sticker for whole team. Wtf we are supposed to do? Cut it ? If you are a blockchain dev don't forget to see this beautiful function i found in the token contract of the selected team from the github.1
-
I spent 2-3 days on debugging code written in assembly script. Apparently, you need to initialise an array using new method otherwise it re-uses the previous array from the same scope and it has created infinitely large array. Just wtf.
And I got error like "wasm blah blah blah blah blah blah".Just give proper error.
Running the environment locally wasn't an option because well it doesn't fucking work locally. So, I have to forcibly test on CI and they have created a site that can show you logs because you can't access or query data directly from server and while debugging you try to log something it randomly works sometimes and sometimes you get output from god knows which deployment. Just create a fucking API for displaying log or build a proper docker so that we test it locally.1 -
How do I get devrant sticker?
I have 50++ on a rant and i have mailed them but i didn't get any reply8 -
I want to learn front-end and i have offers of two bootcamps.please tell me which is better one-month or frontend-masters.
Note: i don't know anything about front-end1