Plan your work in small units (1 day) if possible. Except where specifically required squash the history of your local branch (`git rebase -i`) down to a single commit. You'll simplify resolution of merge conflicts, keep your features as atomic units, and keep your history clean of junk comments. Your workflow should look something like: pull master -> branch -> commit -> squash -> rebase -> push pull request -> review -> ff merge -> repeat. Commit -> squash -> rebase gets repeated as a whole or individually as needed.
Mark J Miller
Posts
-
git poll -
Do we really need asynchronous programming? I don't think so.If your goal is faster individual responses, I agree. I also agree with the point about reducing unnecessary complexity. However, he ignores the argument that using async/await in MVC is more about server resources than user wait time. Given two servers, one written using sync the other async, each with a single connection the server written using sync code will respond faster. But as the number of connections increases the dynamic will change. The async server will return responses sooner as the sync server begins to slow down as unhandled requests queue up and it eventually begins refusing connections altogether long before the async one does. He makes the argument that other tools are more worth your time. However, that it subjective. Will learning functional programming and re-writing my application in F# prove more valuable in the long run? Probably. But can I more quickly grasp the async model and implement it along my hot paths? More likely. Does this mean I should implement async/await from the very start? Be careful of pre-optimization. My last project I wrote using async/await - it took me an afternoon of investigation to determine how to properly use it. It wasn't a significantly large project, but it's in use, under load and stable. I have never found a significant overhead in tracking down async bugs, but that's because I spent time learning how to handle async exceptions and properly implementing logging.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Do we really need asynchronous programming? I don't think so.Yes, he's right that the individual browser will wait anyway, but using async/await in MVC is less about faster individual responses and more about a single server handling more connections. Anyone who thinks comparing individual times of sync verses async will show faster async times doesn't understand async programming and hasn't compared the results. Async isn't free lunch - it comes with overhead. Responsiveness doesn't always mean faster either, it's about providing feedback to the user that "we're working on it" and it means your UI isn't stuck during the process.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Anyone else using TopShelf?I've been using it for four years. I've introduced it to 3 different teams who were all still developing services the hard way (creating a windows service installer project then attaching to the service and debugging). 1) it makes it easy to install your service, just "[yourservice].exe -install" and it's very configurable. 2) it makes it easy to develop against. We have multiple service projects in our solution. We just set up debugging to start all the relevant services at once. Hit F5 and they are all running - no install needed. To be fair a lot of places do this w/o TopShelf, but why re-invent the wheel? 3) supports transactional installs (install fails you can create rollback steps) 4) supports service recovery (actions to take on first, second and third service failure: restart service, run a program or restart computer) 5) It would easily support hosting multiple services, but you'd have to provide that yourself - there's nothing stopping you, it just isn't out of the box. At a couple places I've written a single host console that will boostrap and host any dll as a service as long as there's a class that implements the interface I'm looking for. Modifying it to host multiple services would be pretty simple I assume. It really is a fantastic open source project and its free so complaining about the website and docs is really just nit-picking.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
FREE FROM THE TYRANY OF THE CAPS LOCK!!!!!!!!Sorry, didn't mean to come across like that. I recently got harassed by a couple coworkers about using caps lock (I tried typing on one of their keyboards and the caps lock key was disabled). So maybe I was a little strong because of it. I've been a C# developer for over 10 years but I've done some pretty heavy SQL development in that time, more so than other devs I've worked with. So I guess it's mostly just how I learned it. Like you said "personal preference".
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
FREE FROM THE TYRANY OF THE CAPS LOCK!!!!!!!!Yeah, SQL intellisense sucks - I turn it off completely, but I'd never heard of ctrl+shift+u. I tried it but it seems a little heavy handed for my taste. I don't capitalize everything, just keywords. For me having everything in caps is the same as everything in lowercase.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
FREE FROM THE TYRANY OF THE CAPS LOCK!!!!!!!!I honestly don't understand. Is this a coolness thing? "I can type w/o caps lock" == "Look ma, no hands!" I don't need it for most things, but a lot of SQL conventions rely on all caps for either keywords (MS SQL) or object names (PL-SQL). For any other language I could understand it, but if you're following conventions then typing a word w/o caps lock doesn't make sense: SELECT TOP 10 * FROM mytable A INNER JOIN myothertable B ON B.ID = A.ID WHERE A.myfilter = 1 ORDER BY B.sortcolumn I don't use caps lock for most things, but I use it all the time when I'm coding in SQL.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Can someone tell me why should I upgrade from VS 2008 to 2010 or 2012Unless I specifically mention 2010, I'm talking about 2012 1. It loads faster - large solutions are loaded asynchronously instead of making you wait until all projects are loaded 2. better search everywhere (especially "add reference...") and more detailed solution explorer 3. If you're coming from 2008 then multi-monitor support will be a new feature - it was added in 2010, but 2012 has improved on it by allowing you to have multiple solution explorers (one for each monitor) 4. If you're doing web development then you get javascript intellisense and enhanced debugging 5. aspnet.net 4.5 gives you WebAPI support. 6. Also by skipping 2010 (asp.net 4.0) you're also missing out on features that make web forms suck less like "ClientID" 7. Can you tell I'm a web dev yet? ASP.NET features are implemented as extensions so they can release fixes/features more often (they've already released one for javascript intellisense) 8. As of 2012 solution files are backwards compatible, so 2012 can open 2010 solutions w/o requiring an upgrade - I've been doing this for months since my team has been on 2010 and I've been using 2012 since at least June. This means you only need one version of VS rather than 2. 9. I normally have a lot of extensions installed for all the features I feel like it's been missing. I haven't installed any in 2012 because in typical MS style they've integrated all the stuff other people thought of. 10. 2012 now supports other unit testing frameworks besides just VSTest. (Ok, so it requires an extension - I forgot I did install these extensions a while back). 11. But really, I've just been waiting since 2005 for a dark theme that can be applied to my code as well as my solution explorer :cool:
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Q: Cat5 v WiFiSorry, I've never been on a wireless network that's as reliable as a wired one. I didn't say I don't have wireless. I just prefer wired over wireless any day of the week and twice on Sunday. The only network issues I ever have are wireless ones - 'nuf said.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Q: Cat5 v WiFiWired all the way, not only is wifi much less secure, but it isn't anywhere near as reliable as wired. I stream all my movies from a share on my LAN and never a hiccup - it's a beautiful thing. I wish I had installed conduit. I wasn't aware of it when I finished my basement years ago. As it was I had to fight the electrician just to get him to install the cabling in the first place. He didn't see the need for it and I had to pull a "I'm paying for this and it's what I want". I even ended up capping my own cables.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Time for Chrome to gogggustafson wrote:
But in the production programming environment, this is a serious issue. If you are the development manager for a company that had tied its development to Chrome
In my experience the issue isn't "toy" vs. "production" - tying your entire product to a single browser, especially in an environment as volatile as the web would be a big mistake. However, my intention was to say that your argument that users should leave Chrome *now* because an old version broke something doesn't make sense unless that feature is critical to your business and still doesn't exist in the *current* version. From my experience every browser has something that doesn't work right or was broken at some point by a release or bug fix. But that the issue is different for Chrome because users will *always* have the latest version and if they don't they are in such a minority that you aren't going to loose any money by ignoring them - updating chrome or firefox isn't like updating IE where it can break you in many painful ways. Also, because Chrome is open source, if something is truly broken - like a standard DOM feature that isn't implemented - then contribute or raise awareness so someone who's capable can get it fixed. Telling everyone to leave it because there's a bug or missing feature is overkill. As for Green Links, while clever, I still don't see the benefit of omitting the css file. For a simple stylesheet yeah it's convenient, but first the time you save by just using the css file in the first place outways the clever js trick. Second, I can't imagine doing anything like that with a complex set of css rules. Maintaining it would be a nightmare.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Time for Chrome to goSeems like a lot of work just to avoid including .js and .css files in the project. Considering they are standard web application files and they are static and therefore cache-able why spend so much time fighting it? Also, I don't see the argument for leaving Chrome because users of previous versions had a problem. By that argument, no one should be allowed to use any version of IE because of IE 6.0. Plus, IE users aren't forced to upgrade like Chrome users. Chrome automatically updates without any user interaction, so the only ones who would still be stuck on an old version would be those who have done something specific to prevent the update. I wouldn't even know how to do that nor would it make sense to because even though I may want to target Chrome for development, my users will always have the latest version so targeting an old version is an exercise in futility.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Time for Chrome to goYeah, but W3 schools targets developers and the link was targeted at the comment that most sites are developed using MS tools, specifically IE. This shows that the default (an assumption based on what they are using to visit the W3 site) browser for most developers is not IE. It might be a stretch but I'm willing to bet that developers use their default browser for development and then follow up with other browsers to ensure compatibility afterwards.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Time for Chrome to goI'm sorry, but most sites are not developed using VS/IIS. Apache has far more market share than IIS. My experience has been similar to yours, all my jobs since 2000 have been on the MS stack, but there are still more java jobs than C# (Dice survey)[^] and apache leads IIS in market share (http://news.netcraft.com/archives/2011/02/15/february-2011-web-server-survey.html[^]) I don't see how you can make that claim. And anecdotally, I know MS developers who develop using FF or Chrome because IE's developer tools were so late to the game and in my experience haven't been as good as the latter two. So given the apache statistics (the java link is a stretch I admit since that doesn't directly correlate with web pages) and the fact that not all IIS developers develop using IE I'd say that your claims are not factual at all.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
XSLT for not so DummiesHaven't done much XSLT in a few years, but for about 5 years I was doing a lot of it and Michael Kay's book has always been my bible. Helped me really understand it all, great samples for real problems and a great reference as well.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Microsoft Gone WildIIS Express == ease of cassini (VS Web Server) with the power of IIS. No more running VS as administrator to debug a web app (this alone is worth it). Razor == if it were MS PHP what would be the problem with that? Taking a look at new ways of doing things is a good thing in my book. No one says anyone has to use it, but just because we've always done it a certain way why do we have to keep doing it that way. I am excited to give Razor a spin. Typing server code in ASP.NET code blocks has always been awkward, and since I've been using MVC for the last 2 years it has become even more obvious what a pain the inline syntax is. If this makes things smoother and easier, why not? SQL Server CE support in ASP.NET = while this isn't something I'll probably use, I can see the value. Especially if I want a blog or some other small web app and I want to host it real cheap by not paying extra for a SQL Server instance then why not? It won't be used much by most developers, but I think it is enough of a benefit that it makes it a valuable option.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
Anti malware software you choose?Been using Avast! since 2006 and I love it. The free "home" version is great. I love the ability to run boot time scans and it has picked up drive by attacks many times on my wife's machine. As for performance I have to double check from time to time that it is even running because it just stays out of my way.
-
Rethinking the User Interface Paradigm of Integrated Development EnvironmentsNot sure what to think of this either, but from watching the video it seems like keyboard-only navigation is supported. I'm not sure what the zoom shortcut is, but I imagine the flow is : 1) typing.... 2) hit zoom key 3) each bubble has a key assigned to it, just hit the key associated with the bubble you want I would hope there would be shortcuts for things like goto definition and find references as well, like there is in visual studio
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
To SSD or Not SSD. That is the question.I bought a g.Skill Falcon 128GB almost a year ago. I've been using it with Windows 7 Dell laptop and it is a beautiful thing. I paid $320 IIRC so prices haven't dropped much (if at all). I save time not only on bootup but every time I open Visual Studio (Of course I still have to wait on TFS, but when I'm working on projects not tied to TFS everything loads nicely). Also is nice when I encounter paging issues because I'm running a VM and have lots of windows open, paging isn't as much of a pain. I just built a desktop and laptop for my dad, each with a 64GB drive for the OS. For the laptop I got a Kensington for a good deal. I had him get the Dell Studio 17 with 2 drives so he'd still be able to have easy storage space. I just swapped one out for the OS drive. But it's only been about a month so it's too easy to tell if that one will last as long as mine has.
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."
-
LAMP vs .NETStackOverflow runs on 2 web servers and 1 db server http://highscalability.com/blog/2009/8/5/stack-overflow-architecture.html[^]
Code responsibly: OWASP.org Mark's blog: www.developMENTALmadness.com Bill Cosby - "A word to the wise ain't necessary - it's the stupid ones that need the advice."