r/programmerchat • u/ericlippert • May 29 '15
I am Eric Lippert, a software developer specializing in design and semantic analysis of programming languages. Ask me anything!
117
Upvotes
r/programmerchat • u/ericlippert • May 29 '15
31
u/dum_de_dum May 29 '15 edited May 29 '15
Is there anything in the C# language you regret shipping or that you consider a design mistake?
17
u/mattcwilson May 29 '15
Have you ever encountered a software topic (a codebase, a technique, a design) that made you feel like a newb, and if so what was it?
16
u/dum_de_dum May 29 '15
Hi Eric!
What do you think the next big thing should be for C# ?
14
u/zwlegendary May 29 '15
Hi Eric!
The first thing I want to do is say thank you for everything you've done for the .NET community. Your writing has made an enormously valuable contribution to my personal development as a programmer over the course of my career.
My question is this:
Both the C# language and the .NET Framework in general have always seemed rather "enterprise-oriented," with a particular focus on delivering productivity gains to developers building large line-of-business applications on big teams. Since that's my day job, I'm pretty happy about that. However, in recent years, there's been a rising trend of using C# outside of the enterprise, in areas such as game development (see: XNA, MonoGame, Unity) and embedded systems, which have very different design considerations from enterprise software. Many of the productivity gains which have made .NET popular in enterprise are still an enormous help here, of course, but at times it can also feel like you're fighting against your tools when it comes to things like dealing with the garbage collector.
In your experience, do the relevant teams at Microsoft consider it within the scope of their work to try to accommodate these needs when determining the future direction of the Framework and its languages? If so, how is this sort of thing prioritized, and what do you think (or hope) we might see in the future which would be oriented towards these outside-the-enterprise audiences?
12
u/Martissimus May 29 '15 edited May 29 '15
Hi Eric, thanks for doing the AMA, and for your work on C#. On the whole, I consider C# one of the best languages I know, and I suspect your work is part of the reason for it. I have a ton of questions, mostly about whys in C#.
12
u/mirhagk May 29 '15
Fellow Ontarian here! A few questions:
10
u/[deleted] May 29 '15 edited May 29 '15
Hi Eric.
10
u/recursive May 29 '15
Do you have any idea what the original reasoning was behind the decision that raising events with no handlers should throw?
9
u/FizixMan May 29 '15
Hi Eric! Thanks for doing the AMA!
Reading your blogs and activity on StackOverflow has been a huge boost to my understanding of C# and the CLR. A thousand thanks for your hard work and dedication to elevating the C#/.NET development communities!
It seems like more often than not, I'd read something of yours that would surprise me about C# or its related components (CLR, compiler, BCL, etc.); could be a quirk, a bug, some unexpected behaviour, or a relatively unknown feature. Given your extensive experience and history in C#, do you still find yourself occasionally surprised by something you didn't know about or didn't realize about the language or the runtime? If so, what surprised you recently?
8
u/Pandalicious May 29 '15
When it comes to C#/.NET, what are the most widely misunderstood concepts you can think of? i.e. the kinds of thing where a google search is likely to yield a ton of bad advice.
7
u/concatenated_string May 29 '15
Hello Eric,
Any advice for people just starting their career in software development?
Also, I really like your examples and answers on stackoverflow and your blog. Have you ever considered teaching a MOOC or a class at a university?
7
u/The_Grand_User May 29 '15
What hobby coding projects do you have? What aspects about them do you like?
7
u/FizixMan May 29 '15
Do you have any favourite Visual Studio extensions or other tools that you think the common .NET developer probably hasn't heard of?
7
u/LVX753 May 29 '15 edited May 29 '15
Hello Eric, I would like to know your opinion about the dispute between Oracle and Google regarding the copyright of the Java APIs (https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc.) and, more generally, if APIs should be protected by copyright.
6
u/edtoro May 29 '15
How do you find questions to answer on StackOverflow? I often feel like contributing but have trouble finding interesting/good questions.
6
u/sharprs May 29 '15 edited May 29 '15
We have pronunciation debates at work.
How do you pronounce varchar? GUID? INI? Regex? Bury (our web admin says BURR-ee)? And almost forgot... enum?
6
u/sadcatman May 29 '15
How do you feel about the increasing rise and importance of Javascript, given that the "by-design purpose ... was to make the monkey dance when you moused over it"? Do you feel that any of Javascript's shortcomings are alleviated by ES6 or current frameworks? (Not trying to start a flame war. I'm genuinely curious.)
6
u/mattcwilson May 29 '15 edited May 29 '15
Compilers are great for checking code at the syntax level, and static analyzers are great for checking projects at the style / best practices level. It seems to me there is one level further out that is under (if at all) served: the codebase management level.
We kinda have intellisense, refactoring tools, and templates, but there's little else out there to help large codebase maintainers evolve code well: identify redundant functionality, or potentially brittle / inconsistent interfaces, or other maintainability suggestions.
Is this a niche you think could (and will?) be served by developer tools someday? What would the challenges be?
5
u/andrewclinick May 29 '15
Two questions:
5
u/marpstar May 29 '15
Have you written any F#? Thoughts on the upcoming 4.0 release and beyond?
5
u/CodeSimian May 29 '15
Hi Eric!
How do you see software development change in the future? As a time frame: in the following 5-10 years and then again in 50+ years?
4
u/MrDiSante May 29 '15
Hi Eric,
I’m a developer working on a service which will leave the machine in an unusable state if it either crashes, or gets into an inconsistent state – the service must be resilient to out of memory conditions. We’re writing the service in C, because it is very straight-forward to know where all potential points of failure are – nothing will throw exceptions or attempt to allocate memory without it being very obvious that it does so. However, we have to put up with all the usual goodies that come with C – reference counting, crappy libraries, etc. Every time I have to track down a memory leak caused by a reference leak, I feel like gouging my eyes out. That choice is set in stone, however, in general I find myself wrestling with the question:
In your opinion, is it feasible to write a C# program that will be able to remain correct and functional (potentially returning error codes to callers) in the face of resource exhaustion, given that just about anything in C# can throw (e.g. foreach)?
Let’s assume that all the code has been NGENed, so it doesn't need to allocate to call functions, etc.
4
u/[deleted] May 29 '15 edited May 29 '15
Hi Eric. I'm a somewhat novice software developer. I already have a good understanding of C#, however I feel a bit overwhelmed when it comes to enterprise-application development, there are so many concepts out there: DDD, TDD, Design Patterns, ORMs, and so on and so forth.
What do you think is the best way to learn all that stuff, maybe readings books if so what books would you suggest reading? I'm just a bit lost on what I should learn after feeling confident with my C# skills. Any advice would be greatly appreciated.
Thank you
4
u/propool May 29 '15
Hi Eric
Do you think it will ever be possible to program C# in a backwardcompatible-ish way where NullReferenceException are a thing of the past?
4
u/Pandalicious May 29 '15 edited May 29 '15
Do you think we'll ever see .NET Native come out for desktop applications?
External dependencies are pretty much a deal-killer for most desktop apps, particularly if they require admin rights to install (like the .NET framework). Its telling that almost every large enterprise Java desktop app ends up simply bundling their own jvm that lives in the app's installation directory.
7
u/dogtasteslikechicken May 29 '15
Hi Eric,
What makes it difficult to port great F# features like pattern matching or type providers to C#?
3
u/skycode May 29 '15
Hello Eric, thanks for doing this!
What sort of people and what qualifications do they have/need for working on a language team like C#? Is it a lot of people with, say, both applied mathematics and computer science degrees?
I love doing and studying language design and implementation, and a dream job would be to work on a language team. My degree was in the arts, but I'm now working as a software engineer in games. I feel comfortable doing independent study of PL and compilers, but there are definitely some knowledge gaps that take time to fill.
Thanks again, and thank you for being so active on your blog and SO. Your posts are always an amazing resource for grokking idioms and internals of C# and the CLR. I'm sort of the resident "guy to ask about C# details" on my team, so I frequently reference them.
4
u/indigo945 May 29 '15
How many people from Ontario have you met that were born at a later age?
2
u/Niels-V May 29 '15
Hi Eric,
Where can you get that awesome t-shirt you weir in your blog?
2
u/ChuckEye May 29 '15
What are your thoughts on languages or dialects developed for specific interests, such as Processing for visual art, or ChucK for music?
And are narrow-scope languages like those valuable learning tools for exposing programming to artists and other creatives who might not have considered learning to code? Or should there be more of a push towards the more popular languages in those areas?
2
u/AngularBeginner May 29 '15
Hey Eric.
I really enjoyed your blog posts about melting aluminium. Any chance you'll write more blog posts like this?
2
u/ChrisEJEllis May 29 '15
Hi Eric,
Like many others here, I'm a software engineer, and am fortunate enough to be using C# as my primary language. I'm sure most questions about the language and programming will be asked by others more eloquently, so in the spirit of an AMA, some questions on other topics:
I'm typing this on a phone, apologies for any egregious errors.
Thanks for your time, take care!
2
u/suddenarborealstop May 29 '15
Hi Eric, thanks for doing this AMA,
(not expecting full answers on these questions, but any comments would be much appreciated!)
2
u/Vizer20 May 29 '15 edited May 29 '15
Hi Eric!
Thanks for AMA and C# :)
3
u/[deleted] May 29 '15 edited May 29 '15
Hi Eric,
What are your thoughts on the Unity game (www.unity3d.com) engine and what they're doing with .net mono and a CIL to C++? How do you see their specific mono extensions like co-routines - a kludge?, clever hack?, or thoughtful design that should have been in the .net core?
2
u/throw_addrnotavail May 29 '15
Hi Eric,
Thank you for doing this AMA!
I'm a young compiler engineer working on one of LLVM's officially supported CPU targets. I've been in this position for only 10 months.
Thanks in advance!
2
u/JavaSuck May 29 '15
If you could re-design C#, would you do anything different about object equality? For example, it puzzles me that you can compare a button with a string, even though they are completely separate types. I have been bitten by this in unit testing more than once. (Just to be clear, I would prefer a compile-time error over
falsehere.)1
u/Ghopper21 May 29 '15 edited May 29 '15
Welcome everyone. Feel free to add questions before this starts at 4pm NY time and of course come back then for the live AMA!
And if you'd like to see more AMAs like this, feel free to make requests (or volunteer!) at our AMA discussion thread
1
u/jacabado May 29 '15 edited May 29 '15
Hi Eric, I'm a big fan of your work and your blog.
With the open-source revolution that is happening in the .Net world how do you see that the ecosystem will handle:
Is it possible that will see C# forks? What do you envision as the best outcome to all those changes?
Thanks for taking your time to speak with us.
1
u/rickpock May 29 '15
Hi Eric!
What resource (book, blog, etc) have you found most helpful in learning aluminum casting?
1
u/mattcwilson May 29 '15
Following up on your recent blog series about object-oriented design, are there other prevalent design anti-patterns you see often?
1
u/jptman May 29 '15
Hi Eric, what does a regular day look like for you? For someone as productive as you, I'd like to know whether you work in large swaths of time or are your work sessions broken up into little chunks (pesky meetings!) ?
1
u/serrimo May 29 '15
Eric,
Which 3 things have the greatest impacts on the way you view programming?
1
u/agocke May 29 '15
What single architectural decision by the Roslyn compiler do you think could benefit from restructuring or refactoring to improve batch compilation performance?
For example, binding currently "serves" IDE scenarios a lot by supporting many entry points and being as lazy as possible -- do you think it would be fruitful to explore a 'batch-binding' mode or similar to improve build perf?
What would you say is the biggest architectural advantage mcs has over Roslyn in build performance?
1
u/Martissimus May 29 '15
I'm cheating and adding in another question.
C# is getting more open, light, simple and accessible of late - for example with Roslyn and ASPvNext. The thing that - to me - is still painfully "enterprisy" in the bad sense of the word is the toolchain. Understanding MSBuild has always been an incredible challenge to me, and it still is. For web development we're currently in a state where the "front-end build" based on gulp or grunt with a node backend is completely separate from back-end build, really complicating CI.
Do you know/think simplifying the toolchain is on the agenda with the good folks over at Microsoft?
1
u/adad95 May 30 '15
Here Just to say Thanks very much.
1
u/[deleted] May 30 '15 edited May 30 '15
PS: C# is awesome! I loved learning about it and using it for some projects back in the 1.0 days, but sadly there is a lot of apprehension for MS products in the Linux based environments I work.
1
u/Kragomon Jan 30 '22
Hello.
I am learning C# by your O'REILLY videos.
beside C# i am externally interested in C, do you think is it worthy to spend time and energy to focus on C?
Thank you.
1
u/techgeeksters Feb 06 '22
i need help with my css when i link it to my html my website goes blank here is my css and html
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
<button id="myButton" class="float-left submit-button" >Home</button>
<center>
<h1 class="welcome"> welcome </h1>
</center>
<center> <textarea name="text" cols="30" rows="5">Reason You Visited...
</textarea> </center>
</body>
<center><p><a href="https://www.google.com/">Google</a></p></center>
<br>
<center><a href='https://www.supremelightingdesign.com/'>
<button>Supreme Lighting</button></a></center>
<br>
<br>
<br>
<center><h4>New Visiter</h4></center>
<div>
<center>
<form>
<input type="email" placeholder="please enter your email" required/>
<br>
<br>
<input type="submit" value="Sign up">
</form>
</center>
</div>
<br>
<br>
<br>
<div>
<center> <h4>Returning Visiter</h4></center>
</div>
<center><div class="container">
<label>Username : </label>
<input type="text" placeholder="Enter Username" name="username" required>
<br>
<label>Password : </label>
<input type="password" placeholder="Enter Password" name="password" required>
<br>
<br>
<input type="checkbox" checked="checked"> Remember me
<br>
<br>
<button type="submit">Login</button>
<button type="button" class="cancelbtn"> Cancel</button>
<br>
<br>
<a href="#"> Forgot password? </a>
</div></center>
<div>
<center><a href="https://moshies.github.io/Shragie/"><p style="font-family:verl Website/a></p>
<button> Log In </button></center>
</div>
<br>
<center>
<a href="mailto:?subject=I%20thought%20that%20you%20would%20be%20interested%20in%20this%20email&body=Check out {% raw %}{{ view_as_page_url }}" target="_blank">Share This With A Friend</a></center>
</head>
</body>
</html>
CSS
.welcome{
font-family: 'Segoe script';
text-align: center;
}
.background{
background-image: url('https://www.pixelstalk.net/wp-content/uploads/2016/07/Classy-HD-Picture.jpg');
color: #000000;
}
Body {
font-family: Calibri, Helvetica, sans-serif;
background-color: pink;
}
button {
background-color: #4CAF50;
width: 100%;
color: orange;
padding: 15px;
margin: 10px 0px;
border: none;
cursor: pointer;
}
form {
border: 3px solid #f1f1f1;
}
input[type=text], input[type=password] {
width: 100%;
margin: 8px 0;
padding: 12px 20px;
display: inline-block;
border: 2px solid green;
box-sizing: border-box;
}
button:hover {
opacity: 0.7;
}
.cancelbtn {
width: auto;
padding: 10px 18px;
margin: 10px 5px;
}
.container {
padding: 25px;
background-color: lightblue;
}
thank you so much
0
u/vkhorikov May 31 '15
Has your opinion about implementation possibility of non-nullable reference types changed since you posted this article http://blog.coverity.com/2013/11/20/c-non-nullable-reference-types/#.VWrzGqhSRDw? Here's a nice description of how it can be implemented on the compiler level: https://github.com/dotnet/roslyn/issues/227 What do you think about it?
0
u/[deleted] May 29 '15
[deleted] — view deleted comment
0
u/[deleted] May 29 '15
[deleted] — view deleted comment