 |

|
I am an ASP.NET MVP, author of an O'Reilly title "Building a Web 2.0 portal with ASP.NET 3.5". I have written 48 articles on CodeProject. In this installment we talk to Omar Al Zabir, a four time MVP legend on CodeProject.
|
|
|
|

|
In this series of articles, I'm going to go through some of the mistakes I frequently see people making who are attempting to write benchmarks in C#.... If you reward people for making a measurable improvement in memory usage, don't be surprised if time performance gets worse, and vice versa. If you reward improvement rather than achieving a goal then you can expect that they'll keep trying to make improvements even after the goal has been achieved (or worse, even if it is never achieved!) Eric Lippert thinks you're probably doing it wrong. Here's what you should be measuring.
|
|
|
|

|
A memory allocator's responsibility is to manage free blocks of memory. If you've never read a malloc implementation, you may have assumed that calling free simply causes memory to be released to the operating system. But acquiring memory from the OS has a cost, so allocators tend to keep free chunks around for a while for possible re-use before deciding to release them. Inside a very basic malloc implementation.
|
|
|
|

|
Today I got caught up reading a back and forth in twitter about a proposed assertion syntax for Ruby testing frameworks. It was interesting, but yet again it was about how to make tests 'read well.' It's hard to disagree with that, right? Well, I don't in principle, I just think about the amount of time we spend trying to warp programming syntax into English and I wonder whether it is really worth it.... The thing I wanted to blog about is the clash between this natural language style of programming and the other sorts of programming we do. The code should tell a story. Often, it's a tale of woe.
|
|
|
|

|
In this post, I’m going to show you how I made a Lisp to Javascript compiler. I really enjoy programming in Clojure but have often thought that the JVM isn’t always the best platform for scripts due to the slow JVM start-up. So, I decided to implement a simple version of Clojure that compiles to Javascript and can be run on top of nodejs. Compilers are notoriously hard to understand and therefore make for great mind-bending exercises. Exactly my idea of weekend fun. Let's compile all the things to JavaScript... the language everyone claims to hate.
|
|
|
|

|
As a die hard refactorer, but also pragmatic programmer, I often have a tough time articulating to other developers when a refactor is important and when it is gratuitous. I can imagine many people look at decisions I've made about when it is and isn't appropriate and think it's simply a whim or "when I feel like it". To clarify this for both myself and any future victims/co workers involved with refactoring decisions I may make, I submit this 10 item checklist. Note, writing test cases is a form of refactoring.
|
|
|
|

|
You should only ever refactor when you look at your code and think: that stinks.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|

|
Google delivered some news for users of its Cloud Platform stable of services at its I/O event on Wednesday. Its Compute Engine service — which competes with Amazon Web Services — will now be available to all users, not just those willing to shell out $400 for support. But it also announced the addition of the most commonly requested feature for its App Engine platform cloud: support for the PHP programming language. I was really hoping for a COBOL to JavaScript compiler.
|
|
|
|

|
Open source software simply wouldn’t exist without the countless volunteers who give of their time to contribute to projects. These volunteers are the maintainers, contributors and advocates that make the OSS world go round.... While it may appear that its up to these contributors to take the initiative to put themselves out there, it’s important to remember that its also up to the project creators and maintainers to help pave the way. If an open source project has no contributors, how open is it?
|
|
|
|

|
The plans for Strongbox started nearly two years ago. Kevin Poulsen, investigations editor at Wired magazine, described how he built the tool with Aaron Swartz, who took on the coding for the project. Strongbox runs on the open-source DeadDrop. Through Strongbox, sources can securely and anonymously contact the New Yorker by accessing the New Yorker’s network on the Tor Project. Aaron Swartz's parting gift: safety for wistleblowers.
|
|
|
|

|
I find Google’s evolution quite intriguing. While I think there’s always a danger to judge Google (or Apple) in terms of rumors, I think it fair to try and infer their product strategy from their actions and announcements.... Here are a few thoughts from the announcements at Google IO so far. Note that I’m just going by the announcements. It may be that when these are released as actual products to the public some of my concerns may already be addressed. What do you think of Google's announcements this week?
|
|
|
|

|
Google used its biggest event of the year to reveal a major overhaul to Google Maps, an ambitious messaging initiative called Hangouts, and a redesigned Google+ filled with new features. The three-day long developer event is taking place between Wednesday, May 15th and Friday the 17th for 2013. Google has a lot in store for the event, and you can follow along here for the latest. Not even Google provides a one-stop source for all their I/O announcements.
|
|
|
|

|
CodeProject.TV interviews Zeeshan Syed, Founder of Hak Studio and one of the recent winners of AngelHack Global in San Francisco. Our coder interviews are going video! Tune in and meet Zeeshan Syed.
|
|
|
|

|
GIT works great with the new Team Foundation Service (TFSvc?). I’m an old school Tortoise guy (SVN, Hg, GIT), but I had to laugh at the little branding touch they through in when doing a pull. Notice the Visual Studio logo in ASCII art. I’ve actually been using it for some time, but I hadn’t notice that until today. The good news is that this is just GIT.
|
|
|
|

|
And the Git extensions crash VS2012. Go figure. I tried with all extensions disabled, but only uninstalling the Git extensions stopped the crashes. I like Git, but I will stick to the command line for now, thank you very much.
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|

|
Your signature there had me trying to read your name backwards for a second!
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|

|
Heh. I figured out how to do that from XKCD. Love that webcomic.
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|

|
I watched the dotNetConf .NET Open Source Panel last week. It was a bit disappointing to hear defeatism in the voices of OSS project leaders, because .NET’s future appears to rely entirely on the success of open source software for .NET. Here are a couple reasons... It feels as if Microsoft has shifted focus away from .NET, and with the focus goes resources and innovation.
|
|
|
|

|
Terrence Dorsey wrote: It feels as if Microsoft has shifted focus away from .NET, and with the focus goes resources and innovation.
And we're surprised how???
Marc
|
|
|
|

|
WinRT only applies to store apps running in full screen (without addons) in the new Win8 interface. So it doesn't replace anything since it doesn't service the desktop app needs. And everything is not a web app, so it would seem there's still plenty need for desktop apps and nothing new seems to be replacing that. Yet you hear these cries that X, Y, or Z are "dead"... Its a bit confusing to figure out where they're headed with this. Maybe they're not even sure themselves
|
|
|
|

|
In order to understand Asm.js and where it fits into the browser you need to know where it came from and why it exists. Asm.js comes from a new category of JavaScript application: C/C++ applications that’ve been compiled into JavaScript. It’s a whole new genre of JavaScript application that’s been spawned by Mozilla’s Emscripten project. Emscripten takes in C/C++ code, passes it through LLVM, and converts the LLVM-generated bytecode into JavaScript (specifically, Asm.js, a subset of JavaScript). This is how we get the Unreal engine running in a browser.
|
|
|
|

|
I have had a love/hate relationship with regular expressions in the past. Reading or writing a regular expression typically made me feel like I was toying with a broken Rubiks Cube. However, after I would fiddle an expression into submission, almost by accident, and it did its job, I would become enamored with its brevity and power. It wasn't until I re-adjusted my thoughts on the nature of regular expressions that my fear of them turned into pleasure. After you read this long tutorial on regex, you could probably summarize it using regex.
|
|
|
|
|

|
At the end of a CMS collection its possible for some objects to not have been deleted - this is called Floating Garbage. This happens when objects become de-referenced since the initial mark. The concurrent preclean and the remark phase ensure that all live objects are marked by looking at objects which have been created, mutated or promoted. If an object has become dereferenced between the initial mark and the remark phase then it would require a complete retrace of the entire object graph in order to find all dead objects. This is obviously very expensive, and the remark phase must be kept short since its a pausing phase. This isn't necessarily a problem for users of CMS since the next run of the CMS collector will clean up this garbage. Part of a series on implementing GC in a Java app.
|
|
|
|

|
A few month back, Apple quietly slipped a very nice Objective-C to Javascript bridge into WebKit.... This new API supports straightforward embedding of the JavaScriptCore interpreter into native Objective-C projects, including reading and writing variables and object members with appropriate type coercion, calling methods on JavaScript objects, and directly binding Objective-C objects into JavaScript. It seems likely that this API is going to become public in Mac OS X 10.9 (where JavaScriptCore is already a public framework), and it might be a hint of an eventual public API on iOS. Either way, a new option for building hybrid JavaScript apps is here. The start of Apple’s evolution away from Objective-C?
|
|
|
|

|
It's often said that the web needs a bytecode.... basically the point is that people want to use various languages on the web, and they want those languages to run fast. Bytecode VMs have been very popular since Java in the 90's, and they show that multiple languages can run in a single VM while maintaining good performance, so asking for a bytecode for the web seems to make sense at first glance. JavaScript is already very close to providing what a bytecode VM is supposed to offer.
|
|
|
|

|
Writing a good README is easy. You just need to know what information is required for developers to use and understand the application. Here’s some Rails-centric information I include in the READMEs I write for The Frontier Group... [This file left intentionally blank.]
|
|
|
|

|
Google has product lines on three platforms: web, mobile, and desktop. If you’re heavily invested in its web apps, Android makes a lot of sense. Its integration with your Google account helps it do amazing things. Google Now, for example, combines your location with the wealth of data the company knows about you to, say, automatically pop up your boarding pass at the airport. Or display directions to your hotel when you land. It would be creepy were it not so helpful. (OK, maybe it is a little creepy.) Google needs to make that same impression with Chrome. Instead, there’s a divide between its desktop efforts and other aspects of the business. Two different operating systems, two different experiences. Google doesn’t offer the advantage of an integrated stack.
|
|
|
|

|
The debate to nail down the long overdue Do Not Track (DNT) standard continued at the W3C Tracking Protection Working Group face-to-face meeting in Sunnyvale last week. Despite a less hostile tone in the room, there seemed to be no clear path forward towards agreement regarding the core issue of ensuring that the standard provides users with enough privacy protection to justify its existence. With the group set to begin winding down in July, there is a lot of uncertainty about whether a consensus standard can be reached with such a short time frame, and if no consensus standard emerges, what will happen next. Users want DNT to limits collection and retention of data. But users aren't at the table...
|
|
|
|

|
There's a thought in neuroscience/psychological circles that words are much more than sounds that represent things: they are the abstraction of our higher brain function. Words are language, code is language. Restricting yourself to one or two languages is limiting your cognitive abilities. Whoa! I know kung fu.
|
|
|
|

|
I Know Judo...
Life is all about share and care...
public class Life : ICareable,IShareable
{
// implements yours...
}
|
|
|
|
|

|
Suvabrata Roy wrote: Life is all about share and care...
Aha, Care Bears with Judo, kids beware!
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|

|
I will protect others... its another part of care...
Life is all about share and care...
public class Life : ICareable,IShareable
{
// implements yours...
}
|
|
|
|
|

|
Terrence Dorsey wrote: There's a thought in neuroscience/psychological circles
"Thought" being the operative word here: There's a good argument to be made that language played an important role in the development of the modern brain, and we do know that intelligence is malleable - exposure to the right environment can make at least some people more intelligent.
I mean, it's compelling, it's a beautiful thought, but evidence - AFAIK - is a chain of factoids linked by optimistic assumptions.
|
|
|
|

|
peterchen wrote: exposure to the right environment can make at least some people more intelligent.
Yep, knowing the right people can help you get smart. IOW it's just as much about luck.
|
|
|
|

|
The Article wrote: Words are the very structure of our higher reasoning.
In other words: if you can't say it, you can't think it. Hold on, that doesn't work for me. I very often find myself thinking things that, as far as I know, just cannot be put into words. I don't usually think in words, nor even in pictures, though I can do both if I want. I think in abstract concepts, some of which are linked to words, but not all of them.
|
|
|
|

|
Keep up the good work. I have fought much of my life against an education system that tried to force me to think using other peoples words. Fortunately I inherited a double set of the stubborn gene so I never gave in. I attribute much of everything useful I've ever done to my consequent ability to think differently and yes I do know the costs as well as the benefits, I live with them every day and it is worth it.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|

|
The pod cast linked has some really interesting factoids.
As I understand, not being able to put it into words is an independent phenomenon.
|
|
|
|

|
peterchen wrote: As I understand, not being able to put it into words is an independent phenomenon. It's not that. That's a temporary problem, with a solution.
|
|
|
|

|
Now the big questions is: would you like to say "hello world" in 100 different languages or be truly proficient and creative in few.
|
|
|
|

|
Format string vulnerabilities are a pretty silly class of bug that take advantage of an easily avoidable programmer error. If the programmer passes an attacker-controlled buffer as the argument to a printf (or any of the related functions, including sprintf, fprintf, etc), the attacker can perform writes to arbitrary memory addresses. Behold, the printf of doom.
|
|
|
|

|
The problem with talking about functionality not in the current release sets expectations and distracts from marketing what’s already wonderful about what you’re selling. All you’re doing is diminishing the product you’re selling. You are also making a promise to your customers that you may need to break down the road if priorities change (or Apple implements new OS features that force your hand). Bonus: 5 tips on the right way to run a software company.
|
|
|
|

|
Thanks.
We're in beta now...
whew.
|
|
|
|

|
In the dark old days of the late 1990s and early 2000s, debates would rage about whether open source software is as good as proprietary software. And it was all a matter of opinion. Then, in 2006, the Department of Homeland Security partnered with a software code analysis company called Coverity to examine open source code for security vulnerabilities and software defects. Each year since, Coverity has published a report on the quality of open source code.... But the latest report, published on Wednesday, found something new: the code quality of open source projects tends to suffer when they surpass 1 million lines of code, whereas proprietary code bases continue improve when they pass that mark. Next question: who really needs 1 million lines of code?
|
|
|
|

|
I'm up over 250,000 and will easily need 1 million before I'm done. I'm surprised the figure is as high as 1 million given that every other sizable project seems to hit a major reorganization and has a high tendency to go multi-language at around 250,000. That seems to be the significant scale where structural change occurs. Perhaps another change tends to kick in at 1,000,000 lines that isn't so obvious in the Ohloh stats.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|

|
Depends on what you count as a "line of code" - do you count comments and white space? do you count count curly brackets? The difference can be up to 2x depending on what metric you use.
|
|
|
|

|
For my own code I use the Microsoft LOC counter which does have a bunch of configuration settings for what to take into account but they're unfortunately buried in a hideous Regex based XML format config file so I use the defaults on the grounds that anything else is unlikely to be comparable with anyone else using the same software. It took 17 attempts to even get the thing to install it's so flaky so if anyone can suggest a better alternative I'd certainly be interested.
My observation on the 250,000 line critical point in the history of Open Source projects comes from looking at stats on http://www.ohloh.net/[^] . They have their own counting standards which means my 250,000 isn't going to be the same as their 250,000 but the observation holds that comparing Ohloh counted projects with Ohloh counted projects 250,000 LOC seems to be a critical point for major project restructuring, suspension, permanent branching of projects due to teams splitting up and other highly disruptive events that show up as trend changes in their stats.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|

|
I just count the semicolons (works pretty well for c++, anyways)
|
|
|
|
 |