Erwin.gr

  • Archive
  • RSS

Interesting links week #32 and #33

Below a list of interesting links that I found this week:

Frontend:

  • Websites Shouldn’t Look The Same Across Different Browsers…Here Is Why
  • Be Cool and Write Your Own jQuery Selectors
  • 5 Reasons & Resources for Validating Your HTML
  • What is a Supercookie?

Development:

  • Web.Config / App.config transform Visual Studio Add in
  • C#/.NET Little Wonders: The ReferenceEquals() method

Mobile:

  • Designing For Android Tablets
  • Top 10 Mobile Web Development JavaScript Frameworks

Marketing:

  • Better Facebook Fan Page: Essential Tips, Apps and Examples
  • Ultimate Guide to A/B Split Testing

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #jQuery
    • #HTML
    • #Browser
    • #Visual Studio
    • #Mobile
    • #Testing
    • #Facebook
    • #Cookie
    • #AB
    • #Interesting links
    • #C
    • #Android
    • #Tablet
    • #.NET
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #30 and #31

Below a list of interesting links that I found this week:

Interaction:

  • A simple introduction to web accessibility

Frontend:

  • Techniques, Strategies and Patterns for Structuring JavaScript Code
  • Techniques, Strategies and Patterns for Structuring JavaScript Code–The Prototype Pattern
  • Techniques, Strategies and Patterns for Structuring JavaScript Code–Revealing Module Pattern
  • Techniques, Strategies and Patterns for Structuring JavaScript Code–Revealing Prototype Pattern
  • Cross-Browser CSS in Seconds with Prefixr

Development:

  • C#/.NET Little Pitfalls: Default Parameters are Compile-Time Substitutions
  • Build truly RESTful API and website using same ASP.NET MVC code
  • OWASP Top 10 for .NET developers part 8: Failure to Restrict URL Access

Mobile:

  • Mobile Web Design Trends and Best Practices
  • Apps vs the Web

Marketing:

  • 25 Quick SEO Tips Every Website Should Follow

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #Prefixr
    • #Interesting links
    • #C
    • #CSS
    • #SEO
    • #Mobile
    • #OWASP
    • #.NET
    • #Accessiblity
    • #Javascript
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #28 and #29

Below a list of interesting links that I found this week:

Frontend:

  • CSS Attribute Selectors: How and Why You Should Be Using Them
  • Learning To Use The :before And :after Pseudo-Elements In CSS
  • 10 JavaScript Shorthand Coding Techniques

Development:

  • C#/.NET Little Pitfalls: Nullable Math Doesn’t Always Add Up
  • C#/.NET Little Pitfalls: The Default is to Hide, Not Override
  • Essential Best Practices And Guidelines That Every Web Developer Should Know About

Mobile:

  • 10 Example jQuery Mobile Demo Websites

Marketing:

  • Complete Guide to Facebook Fan Pages
  • Optimise your website for Facebook
  • 8 Things Newbie Web Designers Should Know About SEO

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #jQuery
    • #Interesting links
    • #C
    • #CSS
    • #SEO
    • #.NET
    • #Facebook
    • #Javascript
  • 1 year ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #26 and #27

Below a list of interesting links that I found this week:

Frontend:

  • The do’s and don’ts of Flash
  • Aside vs. Blockquote in HTML5

Development:

  • C#/.NET Little Wonders: The Nullable static class
  • C#/.NET Little Pitfalls: Operators are Overloaded, not Overridden
  • Easy Version Control with Git
  • Nobody Understands REST or HTTP

Mobile:

  • Preview Websites In Multiple Mobile Devices With Mobilizer
  • Picking A Mobile Support Strategy For Your Website

Marketing:

  • 30 (New) Google Ranking Factors You May Over- or Underestimate

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #Flash
    • #Interesting links
    • #Google
    • #C
    • #HTML5
    • #Http
    • #Mobile
    • #REST
    • #.NET
    • #Git
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Nifty .NET Part #4: Enumerable.Any

In part 4 of the Nifty .Net series we have the Enumerable.Any method. The Any method is part of the .NET 3.5 LINQ framework, so it’s only available in .NET 3.5 and upwards. The Any method determines whether a sequence contains any elements.

The method definition:

public static bool Any(this IEnumerable source)

As you can see the the Any method is an extension method on IEnumerable, so you can use the Any method on al classes that implements IEnumerable, like List, string[].

For example:

using System; 
using System.Linq;

public class MyClass 
{ 
    public static void Main() 
    { 
        string[] foo = { "a", "b", "c" }; 
        
        if(foo.Any()) 
        { 
            Console.WriteLine("Contains any elements"); 
        } Console.ReadLine(); 
    } 
}

In this code snippet we determines if the foo array has any elements. To use the Any method we have to add the System.Linq namespace as “using” to our class.

Some of the great advantages of the Any method is that it will stop the enumeration of source as soon as the result can be determined.

Beware don’t use the method .Count() like the following code snippet:

using System;
using System.Linq;

public class MyClass
{
    public static void Main()
    {
        string[] foo = { "a", "b", "c" };
    
           if(foo.Count() > 0)
        {
            Console.WriteLine("Contains any elements");        
        }
        
        Console.ReadLine();
    }
}

The above code snippet uses a lot more resources to determine if a sequence contains any elements, because it have to enumerate through all elements of the collection to get the count. The Any method, as I said earlier, stops as soon as he found an element in the collection.

The Any method has also an overload:

public static bool Any(this IEnumerable source, Func<bool> predicate)

With this overload you can check if there are any elements in collection that matches the predicate. A code example will look like this:

using System;
using System.Linq;

public class MyClass
{
     public static void Main()
    {
         string[] foo = { "a", "b", "c" };
         
         if(foo.Any(s => s == "a"))
        {
             Console.WriteLine("Contains any elements");    
         }
         
         Console.ReadLine();
     }
}

This code example will look for any elements that matches with “a”, and again it will stops if as soon as the result can be determined.

In some cases you can beter use “.length > 0”, this property has a better performance compared to the Any method:

using System;

public class MyClass
{
    public static void Main()
     {
         string[] foo = { "a", "b", "c" };
    
           if(foo.Length > 0)
         {
             Console.WriteLine("Contains any elements");        
         }
         
         Console.ReadLine();
     }
}

The snippet above is faster because the length property is updated when an item is added or deleted from the list, so it doesn’t have to enumerate through the list.

You can find more info and examples on the MSDN pages:

  • Enumerable.Any(IEnumerable)
  • Enumerable.Any(IEnumerable, Func)
    • #LINQ
    • #C
    • #Nifty.NET
    • #.NET
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #24 and #25

Below a list of interesting links that I found this week:

Interaction:

  • Design Usability and All About It

Frontend:

  • CSS Lint – CSS Cleaning Tool
  • 10 HTML Entity Crimes You Really Shouldn’t Commit

Development:

  • OWASP Top 10 for .NET developers part 7: Insecure Cryptographic Storage
  • C#/.NET Fundamentals: Choosing the Right Collection Class

Mobile:

  • Tips to Design a Website for Mobile

Marketing:

  • 30 (New) Google Ranking Factors You May Over- or Underestimate

Other:

  • 5 Little-Known Web Files That Can Enhance Your Website

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #HTML
    • #Interesting links
    • #Google
    • #C
    • #CSS
    • #SEO
    • #Mobile
    • #OWASP
    • #.NET
    • #Usability
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #22 and #23

Below a list of interesting links that I found this week:

Frontend:

  • The 10 JavaScript Mistakes you’re Making
  • Normalize CSS render all elements consistently

Development:

  • Top 10 Git Tutorials for Beginners
  • C#/.NET Little Wonders: Empty(), DefaultIfEmpty(), and Count()
  • Public APIs availability
  • OWASP Top 10 for .NET developers part 7: Insecure Cryptographic Storage

Mobile:

  • Opera Mobile Emulator for desktop

Marketing:

  • 11 Leading Tools for Free Website Analytics

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #Opera
    • #Interesting links
    • #Google
    • #C
    • #CSS
    • #API
    • #OWASP
    • #.NET
    • #Security
    • #Analytics
    • #Git
    • #Javascript
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Nifty .NET Part #3: String.PadLeft

And there is part 3, String.PadLeft, this method will add a specified character to the left side of string till the specified length is met.

The method definition:

public string PadLeft(int totalWidth, char paddingChar)

So what can you to with the PadLeft method in practice? The following code sample will add leading zero’s only when it’s needed:

   1:  using System;
   2:   
   3:  public class MyClass
   4:  {
   5:      public static void Main()
   6:      {
   7:          // Displays: 001
   8:          Console.WriteLine("1".PadLeft(3, '0'));
   9:          
  10:          // Displays: 010
  11:          Console.WriteLine("10".PadLeft(3, '0'));
  12:          
  13:          // Displays: 100
  14:          Console.WriteLine("100".PadLeft(3, '0'));
  15:          
  16:          Console.ReadLine();
  17:      }
  18:  }

As you can see if the string length is already equal to the total width of the PadLeft the zero isn’t added.

There is also an overload of the PadLeft method, this method will add spaces till the total width is met.

public string PadLeft(int totalWidth)

As you probably expected there is also a PadRight method, this will do the opposite of the PadLeft method.

You can find more info and examples on the MSDN pages:

  • String.PadLeft Method (Int32)
  • String.PadLeft Method (Int32, Char)
  • String.PadRight Method (Int32)
  • String.PadRight Method (Int32, Char)
    • #C
    • #Nifty.NET
    • #.NET
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #21

Below a list of interesting links that I found this week:

Frontend:

  • A jQuery Plugin Development Pattern
  • 30 Tips To Improve Javascript Performance
  • About Obsolete Features in HTML5
  • How Important Is Semantic HTML?
  • Ten Oddities And Secrets About JavaScript

Development:

  • Speed up Visual Studio Builds
  • NuGet for the Enterprise: NuGet in a Continuous Integration Automated Build System

Mobile:

  • Analysis of mobile development approaches

Marketing:

  • 15 Questions You Should Ask When A/B Testing a Site

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #jQuery
    • #Interesting links
    • #Visual Studio
    • #ASP.NET
    • #HTML5
    • #Mobile
    • #NuGet
    • #Testing
    • #Javascript
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Interesting links week #19 and #20

Below a list of interesting links that I found this week:

Frontend:

  • 10 handy jQuery mobile tips and snippets to get you started

Development:

  • 8 Tips to Secure a WordPress Site
  • C#/.NET Little Wonders: 5 Easy Ways to Combine Sequences

Mobile:

  • The State of (Mobile) Web Development 2011
  • Building Mobile Web Apps the Right Way: Tips and Techniques
  • How To Create a Mobile-Ready Site

Other:

  • IIS 7.0/7.5’s Hidden Tool. Run-time page request performance data.

Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    • #WordPress
    • #jQuery
    • #LINQ
    • #Interesting links
    • #C
    • #IIS
    • #Mobile
    • #.NET
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 9

About

  • @erwingriekspoor on Twitter
  • erwingriekspoor on Delicious
  • Google
  • Linkedin Profile
  • erwingriekspoor on github
profile for Erwin on Stack Exchange, a network of free, community-driven Q&A sites

Twitter

loading tweets…

I Dig These Posts

See more →
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr