16 posts tagged “development”
There is now an open source release on CodePlex for a subversion based assembly version management library that leverages MSBuild Tasks for automation. What this provides is a way for you to integrate version management on your Visual Studio Projects and automatically ensure that the SVN Revision number is attached to the assembly version.
A lot has changed in the world of web services. This series is to get you on the right track to building incredible web services using a ridiculously easy model in the .NET 3.0 Framework.
namespace WinOrFail
{
[ServiceContract]
public interface IWantToWin
{
}
}
namespace WinOrFail
{
[ServiceContract]
public interface IWantToWin
{
[OperationContract]
bool IsThisPossible();
}
}
using System.ServiceModel;
namespace WinOrFail
{
[ServiceContract]
public interface IWantToWin
{
[OperationContract]
bool IsThisPossible();
}
[DataContract]
public class Money
{
[DataMember]
public double Amount { get; set; }
[DataMember]
public Currency Currency { get; set; }
}
[DataContract]
public enum Currency
{
[EnumMember]
US,
[EnumMember]
Euro,
[EnumMember]
Peso
}
}
It isn't enough to pass by a statement without making it bold so I'll just state it as plain and straight as I can.
Software Development, better so product development, does not require a breath-first approach. Software is about building structure out of a unstructured idea. Design is about attempting to capture that for what it's worth to a humane understanding. Management is the process of ensuring that all this knowledge is kept synchronized and a flow is followed to the end-goal.
I know I can come up with something and it shall be launched! In the meantime, check out this new design I made. At some point I should actually put some content into the design, but I enjoy this. This one is called Plenatude.
It's not nearly as complete as the others, but I like the colored rays. I think I'll build on this one and get back to you. Here's another view without the navigation links, you can see the rays better.

I also made a "People's Software Manifesto". This should count as content.
I've been working on a release for a reading and writing system called liquidi. It's web-based, of course, and it's main purpose is to facilitate accelerating reading with the accessibility of up to date resources from around the web.
I've centered the content to currently aggregate common RSS feeds from news, books, and websites with learning material.
There is currently no plan on embeding videos into the system since the focus is about reading and writing on the web. The interface is incredibly simple and incredibly fast. Here's a brief look at the application from the homepage view.
The basic motive is to create a reading and writing social utility that puts both the focus and intentions of the user at the forefront. Every rating, comment, review and simple view applys an interest variance in the application. In layman terms, the more you read, the more you'll find that the application remembers that and thus looks for similar reading material. Right now we're at the stages of incremental analysis to enable our users to mark reading material with either special distaste or special interest. We plan on adding the ability to mark items to help relevancy in content.
More details to come in our expected release date!
Thanks to a leak from the WWDC, several details of the capabilities and limitations of the browser are now known, and major Ajax vendors are scrambling to make sure their toolkits will support it.
The resolution is 320×396 for the web viewing area in portrait mode. The dot pitch will be smaller than you’re used to, however, so you should avoid hard-coding font sizes.
Unfortunately, neither Java applets nor Flash will be supported in this browser, at least in the initial version. Video and audio is supported through Quicktime (H.264 baseline profile level 3.0). Interestingly, YouTube videos will work on the iPhone, but only because YouTube will recode their videos into H.264 format for the iPhone and Apple TV (instead of the On2 VP6 video format that they use now inside the Flash player). Since H.264 is one of the best high-tech formats available today, we might see better quality video at the same bandwidth. Links directly to movies will reportedly switch the iPhone into full-screen, landscape video playback.
The browser has some limitations most developers are not likely to run into, such as a 10MB max html size for the web page, 5 seconds of run time and 10MB heap allocation limits for Javascript, and a maximum of 8 documents viewed at once (in tabs).
The iPhone will have built-in support for viewing PDF, MS Word (.doc), and MS Excel (.xls) format files. PDF will likely work the best, since that’s a native format for MacOSX.
Telephone-specific urls will, for example, allow the user to click on a link and make a phone call. These include “sms:”, “tel:”, and “mailto:”. In some cases it appears special links are not really necessary. One source says that if a phone number appears anywhere on a web page Safari will automatically recognize it and make it clickable, just like browsers on some other phones.
Here are some more recommendations from Apple to make your content look its best on the iPhone:
- Separate HTML and CSS (that’s good advice all the time)
- Use well structured and valid HTML (ditto)
- Size images appropriately (don’t rely on browser scaling)
- Tile small images in backgrounds (don’t use large background images)
- iPhone supports both EDGE and Wi-Fi. EDGE pipe is smaller than Wi-Fi pipe, so consider bandwidth when developing.
- XHTML mobile documents supported.
- Stylesheet device width: 480px
- Apply different CSS for the iPhone. For example displaying a one column page for iPhone vs. a 3 column page on a desktop.
- There are no scroll bars or resize knobs. The iPhone will automatically expand the content.
- Avoid framesets. Scrollable frames are automatically expanded to fit the content
Bottom line:
Like the Opera-based internet browser on the Nintendo Wii, most developers will look at the iPhone as yet another high-volume consumer-oriented web platform for their pages and applications. As a first pass, it would be a good idea to ensure your apps don’t look like crap on the device. Then if you notice a lot of iPhone traffic or want to target it specifically for some other reason, you can use CSS and user agents to customize your presentation to your heart’s content.
Related info:
Just in case you didn't have either the time or like in my case, the money, to go the Las Vegas and see Microsoft's Mix 07 event, you can view the video below from some of the keynotes and demos from the event.
And in case you don't know, the Mix 07 event is where all the web designers, developers, industry makers and market professionals gather to show off some of the newest technologies from Microsoft and talk about what's to come in the technology fields. For more information on the event, just go to http://www.visitmix.com
this video contains:
Ray Ozzie key note
Scott Guthrie key note
How Netflix uses Silverlight Demo
Expression media encoder, expression designer, expression blend
Silverlight demos Silverlight
This is slightly outdated, but I figured I post about it anyways. If you didn't already see Bill appear on the many shows showing off Windows Vista, or see him in the tons of interviews by such sites as MSDN's Channel 9 or Channel 10. Then you might like watching this one of him on The Daily Show with Jon Stewart.
I'd like to say that in all of his interviews, you can definitely catch his aim on software of tomorrow. Where the software we produce and use becomes contextual and personalized. A great step in .NET, for instance, is such SDKs as WPF. Where the interaction of our applications is a lot less dull and a lot more productive and exciting for our users. Creating interactive and intuitive applications that only display what is needed and used in a given context. I see a lot of applications being developed that are based on this model of context + interaction + personalization.
Thinking of the many Web 2.0 Applications out there, I have seen less pushes towards desktop application development. Although, it is nice to have web applications that can store all my information and I can access it wherever I go, it can potentially open up a lot of security flaws where my data could be compromised.
Google Docs, and several other office applications now let you create documents and store them online. Even still we can do all of our finances, communications, and storage all online. Again, this can open the doors for hackers to steal almost anything we may possess given a little data mining. But this goes back to the old principle that I believe Matthew once told me: if you have extremely sensitive data, don't put it online. I'll agree in the sense that there is just information that we really don't want getting out such as our finances, but other data we may need it to be connected and viewed by others even if it is sensitive. This is where one of Bill Gates emails comes in handy. (Read it here)
I feel that the Web is a way of connecting people much more rapidly than a desktop application may. Utilizing community features, and other web application usage is a great idea for most applications. Integration is a very important role of development. There is of course, Smart Clients, where the application is already connected with the web. However, this will all, of course, depend on the application being built. The principles behind the application should determine how it is connected if at all.
Going back to the personalized context interaction, it may take nothing less than data mining to determine the users intent and basic needs to accomplish a given task. Whether or not a given task is difficult to accomplish will rely on how interactive it is. We are, of course, talking about complex applications and generally speaking web applications. Creating web applications that dynamically populate data, inserting ajax based controls with immutable data can be far more interactive than nearly all desktop applications. The basic problem with desktop applications is that most desktop apps are developed through static WYSIWYG editors, and thereby severally undermining the architecture of both the system and especially its interaction.
Along side the .NET 3.0 framework we have WYSIWYG editors that accomplish what I'm talking about in the Microsoft Expression Suite. One such is called Blend. In Blend, you design your application with all the interaction you would like, moving around controls, destroying them, creating them, manipulating them all through the editor. With most desktop application development cycles, this would take a lot of custom code. The Expression Suite definitely eases this process in development, making interaction/design stages of development a lot smoother into programming. The ability to create applications with truly intuitive interaction is becomming less and less difficult. I believe the next step in intuitive interaction is indeed context, providing relative information to the users. Some of the other concepts could also be vertical search and definitely personalization. We have already seen personalization spread through sites such as NetVibes and Pageflakes. It will interesting to see how this progresses into other fields of software development.
Software is complex, in fact it can be infinitely complex depending on how the product is developed if extensibility is a factor. There are literally millions of scenarios that can occur not only the development of a product but even after a product has been deployed. Many times after a product is deployed (after getting customer feedback) developers will run into many issues that they did not foresee originally. When software is deployed and run on a client machine there are scenarios that may work for one user but not for another; like settings and runtime environments.
Because of these vast differences in environments, developers use common test utilities to cover their code and test against common scenarios that may break working code. Surely you should test to see if you code works, of course it should work you wrote it. There are, however, many scenarios that haven't been tested even after coverage is 100%. As such, after developing an application, there needs to be a standard for finding out possible failures in the code. I've noted some of the principles involved in testing basics for developing software.
- Find problems before customers do
- Find problems customers care about
- Ensure all features of the product are acceptable by the customer.
- Provide timely feedback on functionality of new features.
- Provide timely feedback on stability of old features.
- Role is not to prove the program works
- No way to fully test all possible program paths
- All software ships with some problems
- A problem is anything the customer doesn't like.
Some testing approaches have been known to include:
- White Box Testing (aka Glass Box Testing)
- Full access to the source code
- Static analysis
- Code reviews
- Static analysis tools (FxCop, etc)
- Dynamic Analysis
- Step through code in a debugger, examine program state
- Profiling (line coverage, branch coverage, performance)
- Black Box Testing
- No assumptions on implementation
- Two approaches
- Automate user interactions
- Use public API provided by the program
- Both techniques have value
- An UNDONE comment in code may reveal a subtle bug
- But customers don't read or profile code
Let's take a step back from testing and think about the psychology of testing itself.
- Testing is inherently adversial
- Programmers are trying to ship and you're telling them they can't.
- Product managers are losing money in development costs and lost revenue and you're telling them they'll lose more if they ship now.
- Never make it personal
- Issues always outlast programmers, especially bad ones. When you write a test scenario, the code could be re-written and re-written over and over but the test scenario lives through all the code rewrites.
- Issues always outlast programmers, especially bad ones. When you write a test scenario, the code could be re-written and re-written over and over but the test scenario lives through all the code rewrites.
- You have to carefully sell the things you really care about.
- Clear expectations in bug reports
- You can't simply put "X Doesn't Work." in a bug report. That doesn't explain anything to anyone reading this. A developer won't have your test code, you have to be able to explain enough to allow anyone to go right to where they need to be to fix code.
There has been some discussion over how much .NET developers actually use in their first few years of development. I'd like to post a few keywords that are rarely seen for the majority of us. Feel free to comment on any others to contribute to this post.
UPDATE: Thanks to Matthew, I've added the default keyword.
stackalloc
stackalloc allocates memory dynamically from the stack. Its very fast and the memory is reclaimed after the enclosing function exits. But it, of course, has some limitations. It only works with blittable types. It's good for arrays that will never be anything more than a few hundred kilobytes. By default, the maximum stack size is one megabyte. In practive, function call depth is very very small, unless you do something like a recursive function scanning a deep tree. Offsetting the risk that a stackalloc can generate the StackOverflowException is the infrequency of multiple dynamic stack allocations in use at the same time.
yield
yield is a common term used when referring to Iterators. The keyword can only be used in the context of an Iterator actually. Furthermore, the definition of an iterator holds the usage of yeild. Here are some definitions via MSDN.t
- An iterator is a section of code that returns an ordered sequence of values.
- An iterator can be used as the body of a method, an operator, or a get accessor.
- The interator code uses the yield return statement to return each element in turn.
- Using iterators, it is no longer necessary to implement the interfaces System.Collections.IEnumerable and System.Collections.IEnumerator when creating a collection class that supports foreach. The compiler does this work for you.
- The return type of an iterator must be System.Collections.IEnumerable, System.Collections.IEnumerator or one of the generic iterator interfaces.
The volatile keyword indicates that a field might be modified by multiple concurrently executing threads. Fields that are declared volatile are not subject to compiler optimizations that assume access by a single thread. This ensures that the most up-to-date value is present in the field at all times.
The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock Statement (C# Reference) statement to serialize access. See How to: Create and Terminate Threads (C# Programming Guide) for an example of volatile in a multi-threaded scenario.
default
Generally seen in generic code, the default keyword can be used to obtain the default value to a parameterized type (such as T) when you don't know some of the following:
- Is the type: Value-Type or Reference Type.
- If it is a value-type, is it numeric or a struct.
Type Constraints
Aside from the usual keywords, there are also other concepts that may be uncommonly used. One really neat trick to generics in C# .NET 2.0 is type constraints. This is where you can take a generic type like T, and apply constraints such as the types polymorphisms and inheritance factors. We can take a simple type T, and actually require that it implements a given interface or inherits from a particular class. Even still, we can require that it has a default constructor created.
In this case I am writing type constraints on the generic type Products to implement the IBuilder interface and contain a default constructor (indicated by the new() constraint). This can be handy when dealing with generic types and you can ensure that not just any type is being used for a particular class.
