3 ms·
You're very right. I still don't know what I want it for. Of course I'd like to learn, money is (fortunately) right now not a problem for me but I would like to
by trevcanhuman 5y ago
You're very right. I still don't know what I want it for. Of course I'd like to learn, money is (fortunately) right now not a problem for me but I would like to get an actual job, since I've actually never had one.
Right now one of the projects I've been working on is a URL Shortening service and a simple app that returns your HTTP Headers.
I'm trying to write it in Plain C. It's certainly hard. I can imagine exactly how I'd do it in NodeJS (you can define the POST and get methods directly and stuff). But I definitely want to learn how to do it from a high-enough low-level language. The problems I'm having right now are not being able to process HTTP POST requests correctly. The code is here [0].
references
[0] https://github.com/trevcan/short https://github.com/trevcan/short
- skyde 5y agowhile it’s a good idea to understand how to use TCP socket directly. Trying to reinvent http request parsing is a waste of time. You could do something simpler maybe. one thing i noticed from your code is it can only process one request at any given time. A real server would start a thread for each connexion.
- trevcanhuman 5y agoYep, I’ve read a little here and there on multi threading but haven’t actually tried it out. I’ll look more into it later in the day. I’ll definitely try it out using some http library and see if that works with the url shortening and all.
- danielmarkbruce 5y agoIf you want an internship it's going to be at a company which makes a product/service for the real world. So simulate that. You can learn the inner workings of C as a separate thing. Build something which is live, ie not just a code base. You have AWS at your disposal. You have to write code, build it, deploy it, get a domain name, load balancing, get a cert, set up a database (maybe just use sqlite). There is a lot to building real things and the only way you can learn how to do it is building real things. If you want to put a job at a company on your resume... start an LLC, give yourself a job title, build the product, launch the product and put it on linkedin. A lot of this is messy, annoying, bang your head against the wall stuff. That's the real world.