I’m scared bros, will I ever get a job as a C developer?
It's All Fucked Shirt $22.14 |
Tip Your Landlord Shirt $21.68 |
It's All Fucked Shirt $22.14 |
I’m scared bros, will I ever get a job as a C developer?
It's All Fucked Shirt $22.14 |
Tip Your Landlord Shirt $21.68 |
It's All Fucked Shirt $22.14 |
deal with your own fears and problems, hire a therapist.
probably not unless you're working with a hardware manufacturer
You just have to practice writing a hashtable impl from memory as quickly as possible. Just one of many lovely things that go into interview prep. All completely pointless in current year, of course.
We're not hiring either...
Yeah just give up. You should have learned Java instead sir
>try to write a simple program in C
>Segmentation fault
Frick this, I'm going back to python.
python is a bloatmaxx language. the only reason you'd use this garbage is:
1. you have no time
2. webscraping
Computers have gigabytes of ram today, who cares about bloat?
and this homosexual is the reason why the calculator app on my phone is 748mb
>the only reason you'd use this garbage is:
>1. you have no time
You don't. It's an interview.
and you don't expect to have a life or career outside of that one single interview?
If you were employed, you would know how much 1. is prevalent and that engineering hours is the largest expenditure of many if not most tech companies.
>python is a bloatmaxx language.
Python is bloated because C makes every program have a separate Python interpreter. If it was designed like Mezzano, there would be one interpreter/compiler and runtime shared by all the Python programs and they would use less memory than C programs.
>try to write a simple program in C
>Segmentation fault
These are people complaining about C.
Regardless of the language, do you really want them to write code?
There's hsearch in POSIX.
Or use any of the multiple general libraries that you are familiar with.
unironic skill issue
I'm hiring for a C developer right now but all I find are morons that know C++ and C#.
I don't mind the C++ guys so much thoughl
>all I find are morons that know C++ and C#.
>I don't mind the C++ guys so much though
Whic is it man? You hate us or not?
>Whic is it man? You hate us or not?
He said you are morons, he didn't say that he hates you.
>I’m scared bros, will I ever get a job as a C developer?
Me too. DoD seems a good bet seeing as how the Democrats are doing their goddamnedest to start as many fricking wars as they possibly can.
int key = 123;
int value = map[key];
There's your fricking hash map in C. The hashing function is an identity. If the interviewer doesn't like it, he's a homosexual.
>No collision resolution
There are no collisions because all keys are unique, which I can assume because no one said that memory is limited.
incredibly based.
>screenshot thread
You never had a chance, homosexual.
C is a meme pushed by people who get emotionally attached to their first language and take pride in doing things the tedious way
```
#include "uthash.c"
```
Or just roll your own implementation of a hashmap, it's literally college freshman DSA, and it only takes a couple minutes to write a primitive one.
C is not a meme. Its only real alternatives are C++, which is trash because operator overloading is literally the idiomatic way to read text from stdin, and Rust, which forces you to learn memory safety which is a very advanced CS topic.
>memory safety which is a very advanced CS topic.
it's not advanced at all. don't be a dunning-kruger. memory safety is a very easy topic to grasp.
> Rust, which forces you to learn memory safety which is a very advanced CS topic
It's a necessary evil, no?
The problem with C is that it doesn't address this, and most system developers end up learning about aliasing problems and ownership the hard way. Sometimes, the hard way is a shitty vulnerability that takes years to be found in the wild and manages to frick all users.
If this was taught in schools from day one I believe most students would learn at least how to be cautious when using C, if they don't care about Rust.
>inb4 students giving a shit about anything
>C++, which is trash because operator overloading is literally the idiomatic way to read text from stdin
This is a lazy meme answer, you can just not do that way. And they added std::print so you don't even need it for printing any more
>Rust, which forces you to learn memory safety which is a very advanced CS topic.
You still need to learn it for C only the language isn't of much help
>including a .c file
c++ has moved away from operator overloading for such things now as metaprogramming (templates) can handle that now
Writing a doubly linked list is very easy in rust, so once again, I really don't get it. You can even do it exactly like you would do in C. Shit, the rust book for babies literally implements one.
Are we just throwing shit at the wall and seeing what sticks here?
I moved from C to Rust, but implementing a hashmap in C isn't a particularly complex or time consuming problem at all. I don't get it.
Unless the question was about hashing algorithms I guess, never looked into those at all.
what jobs are there in C, really? automative and embeded?
how is this
reddit typing?
my uni school taught dsa in c
genuinely curious, what business are actually using c to create products these days?
C is more popular now than in the past because of IoT. It's used a lot in embedded programming and for writing core libraries that can be run on any device and used from any programming language.
Every microcontroller industry relies on C and C++ to make their shit work. There's no alternative since Rustrannies are focusing only on software that run on PCs. The only real alternatives to write Rust on microcontrollers are cammunity-driven projects which I don't need to explain why are not a viable option in a professional environment.
>to create
No-one. It's a dead language now, used only by maintainers.
It's the first thing they teach you in Cs50.
How much production software is created in CS50 courses?
How much is created by neets arguing over languages on IQfy?
I argue about C vs C++ vs Rust vs Zig vs Python vs Ruby vs shell on IQfy while procrastinating from writing critically important PHP shitware
Holy copium
I wish I had some copium.
t. maintainer
You say that and yet C++ and C are the most used among compiled languages.
1. Anon said C, not C++. New C++ projects are started all the time, C not so much.
2. "Most used" doesn't imply anyone is using them to make new things. There's a lot of C out there.
Actually, C++ and assembly both count as C, so C is uhhhhhh still less popular than SQL??? That can't be right, let me check my notes...
Pretty sure everything that appears higher on this list than C/C++ was all written in C/C++
Firefox's CSS engine is partially Rust I guess
Not true, and even if it is, Firefox doesn't matter because Chrome exists
>Not true
https://hacks.mozilla.org/2017/08/inside-a-super-fast-css-engine-quantum-css-aka-stylo/
It's breddy cool. AFAIK still the only parallelized CSS engine, Chromium tried but couldn't manage it
Chrome is using Rust too now.
What are you going to do? Switch to Pale Moon?
Only a very small part of Java is in C++, just a few bits around interfacing to the OS (on most platforms). The rest is direct native code and has been for ages.
>rust is more used than Kotlin
It’s over
C is the language of choice for nearly all embedded applications. Don't believe me? Look at the rust community survey
I'm doing robots and computer graphics in C, but realistically C is going to be worse than langs like Odin, Zig and C++ (if you keep templating to a minimum) even for stuff like video games where C is traditionally the best.
Learning C is still based though, and I encourage everyone to do so. Coming from a higher level, it's refreshingly simple, and keeps the complexity in the program rather than in compiler magic.
>and keeps the complexity in the program rather than in compiler magic.
That's the opposite of what it should be. One compiler can compile millions of programs. You should handle the complexity one time where you get it right instead of making everyone do it millions of times. This is what's wrong with software today and why everything is bloated. Everyone has to reinvent wheels and you can't have good optimized implementations of anything.
with equal code quality, a generalized solution is always slower than a situation-tailored one.
thats bc a generalized solution will always have more checks to do than a specialized one.
and no, thats not whats wrong with software today.
shit swe's are.
>with equal code quality
You're not going to get that, our time on earth is limited
and thats why some code in C, and others in rust
i routinely beat the libc by virtue of controlling the data. and i posit that its a sign of competency, not talent.
or maybe we should come up with a new term, "software/codebase architect" or something to denote the difference between someone who can use a codebase, and someone who writes it
>our time on earth
>implying there's time in a different place
MIC companies like Lockheed-Martin, Grumman, BAE Systems, etc.
Come into embedded development, nobody will ever ask you about implementing hashmaps since RAM here is extremely limited and for safety reason is better to just write everything using a RAII approach.
>will I ever get a job as a C developer?
in practice, no.
but C allows you to create your own
especially once you delve into its dialects
how old was the interviewer
my guess is sub 30 if it laughed
begone seething troon
just learn python for shit like this, why didnt he ask to solve the problem in another language anyways?
unsigned long
hash(unsigned char *str)
{
unsigned long hash = 5381;
int c;
while (c = *str++)
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
return hash;
}
you're welcome
Why can’t cniles fathom a hash table with a key type of anything besides a string?
Why can't sepples dipshits understand that everything is just bytes?
>itz all 1s and 0s maaaaan xDDD
cnile brainlet try not to be in the wrong end of the dunning Kruger curve challenge
>dunning Kruger
The irony is that most people that use that term are on the left end of the curve.
C doesnt have strings, this just works for every 0-terminated data sequence, and its trivial to modify it to work on fixed length data
That's clever, this means it should also work for arbitrary structs because they're null terminated too and there's never a zero in the middle of a
>what does sizeof do
git gud
More importantly, this would require you to properly initialize the padding bytes in all your structs, and I've never seen anyone actually do that.
>filtered by sizeof
What does that have to do with anything?
>Interviewer asks what language I'd like to do the practical test with
>I tell him untyped lambda calculus because I'm an average IQfy poster with an enormous neckbeard
>I scribble a bunch of random bullshit on the board because I don't know how to code
>Interviewer has no idea what it means and is forced to conclude that I'm a 500 IQ gigagenius
>Don't get the job because I'm a white man and they have diversity quotas to meet