7 ms·
Many of the responses there are for C in lieu of C#, which I disagree with. Unless you need the performance of C, you should always use a higher-level language,
by debacle 14y ago
Many of the responses there are for C in lieu of C#, which I disagree with. Unless you need the performance of C, you should always use a higher-level language, and C# is a beautiful and powerful language, and if you're any sort of C programmer, you can pick up C# relatively easily.
- dazzawazza 14y agoIn general of course what you say makes sense but in this instance the app should be written in C. The client asked for C, they know the future, you do not. If, as the service provider, you recommend C# and detail all the advantages and the client still wants C you go with C. Simple as that. Saying C# is beautiful and powerful is irrelevant. The task can be done in any number of languages but the client asked for C, go with C.
- debacle 14y agoThis isn't a client, it's a manager. There's a vast difference in the relationship there.
- dazzawazza 14y agoYes there is but within the scope of this problem I don't see that it makes much difference. You talk to your manager and recommend something but the buck stops with him and you do what he says. He is essentially in charge. If you can't accept this then leave, you have no respect for then, why would you want to work with them. If you need the money they get on with it. Programmers need to be more professional. As a professional you give your professional opinion but that isn't gospel. You note your protest and then get on with the job you are paid to do to the best of your ability. BTW I am a programmer. I've been junior, lead and manager so I've seen it from all sides.
- toyg 14y agoProgress is achieved by unreasonable people. If all programmers had never "disobeyed" their managers, we'd be probably still writing accounting software in COBOL.
- dazzawazza 14y agoSo it's OK for the programmer to be 'unreasonable' but not for the manager? Progress is actually made by teams of people working together for a common goal.
- eswangren 14y agoYeah, but perhaps your boss knows something you don't, perhaps he has some amount of wisdom gained through experience that you don't.
- Avenger42 14y agoYou don't do that by disobeying your boss - you do it by quitting, finding your own clients, and saying "your competition is taking 6 hours to do this, and I can do it in a fraction of the time by using new language/feature/technology/process X", and beating your boss at his own game. If your boss isn't paying you to look at the new technology, do it on your own time and in your own projects. If you want, you can come back afterwards and say "based on my personal experience, we can save time/money by switching to X" and give them the opportunity to try it out - or to overrule you.
- chris_wot 14y agoANSI C is a near universally portable language, C# is not. His boss wants it written in C, and his boss is the customer. Of course, his boss is specifying global variable names, so said boss is a micromanager... A no-win situation here really...
- damian2000 14y agoC# isn't as portable as C but it isn't totally unportable either. Mono allows you to target iOS, Android and Linux for example.
- shadowmint 14y agoHardware interaction is the place where mono fails most often in my experience; portability for something that actually touches the underlying hardware (of any type) is probably not possible using c#.
- damian2000 14y agoAnd for that you can always call the native methods written in C, from C# - the support for doing this is excellent on both Linux and Windows. You can reference a function in a .DLL on windows and in a .so on linux.
- icefox 14y agoHave you ever heard a C# guy going around talking about how they ported their C# code to iOS/Android/Linux? Excluding projects started with that specifically in mind and built using Mono I have never heard of of a Windows C# project going the other way.
- damian2000 14y agoAgreed its rare but I wanted to reply here because I did just this thing myself last week. I had a ~6000 line TCP/IP sockets and serial port application (command line) written in C# on windows. I needed to port it to run on a Raspberry Pi (running Debian Wheezy). A rewrite in C was the initial plan/expectation. But got it working in Mono, with only a handful of changes to the serial port code.
- jerf 14y agoThere's another reason. C + threads + computer science students maintaining it in sequence over the course of years is a recipe for disaster. Drop any one of those and it can be made to work, but not that trifecta. That said, the right answer is probably still to deliver it in C as requested, and walk away. The customer has spoken, and seems to broadly know what he is talking about (ie, it isn't a nontechnical customer who is asking how "cloudy" your solution is, it's a programmer), so... well... OK... if that's what you really want....