Brilliant Tech Interviews – Google, Twitter, Microsoft, Groupon

One of the world’s best interview shows, Charlie Rose has on it’s website a section dedicated to technology. It features amazing interviews with Twitter founder, Jack Dorsey, Google CEO Eric Schmidt, Microsoft co-founder Paul Allen and many others. These are great for a developer or anyone with an interest in business or technology.

Did you know that Twitter was actually developed over two weeks in 2000, but the owner did not want to release it then because of limitations in SMS technology? Did you know that China, during it’s negotiations with Google insisted that Google filter out anti-communist websites for searches done outside of China. Did you know that Microsoft co-founder Paul Allen, who had to temporarily leave the company at the age of 30 due to cancer treatment, had Bill Gates and Steve Ballmer conspiring behind his back to dilute his share of the company? This and other great tidbits are included. Link is below.

http://www.charlierose.com/topic/technology

Advertisements
Posted in Free Videos, Non-technical | Tagged , , | Leave a comment

WAVE Accessibility Toolbar – Find Exact Source of Errors

The WAVE Accessibility Toolbar is an indispensable add-on for creating an accessible website. Unfortunately, when it evaluates your page, it does not always tell you exactly where the errors are. To know the exact location, simply disable styles, as shown below.

Wave Showing Error Source

Posted in Non-technical | Tagged , | Leave a comment

Semantic HTML5 Across All Browsers (and without Javascript)

HTML5 and it’s new semantic elements give developers a much larger toolset to give meaning to your HTML.  As usual, IE6 almost ruins it for
everybody 🙂  Fortunately, there is a way for the new semantic elements like section, article and aside to be used and still work with any browser.  It excludes
the need for the shim javascript file as well, enabling your site to be
compatible with the approximate 10% of users who disable javascript.

To use an element such as section, write your code like below.

<section>
<div class=”section”>lorem ipsum …</div>
</section>

You then add css styling to the div class, rather than the element.

.section
{
font-size: 11pt;
}

Posted in Technical | Tagged , , | Leave a comment

DVD Review: HTML5 Now by Tantek Çelik

The “next big thing” in web development HTML5 has many great features and the first wave of education material has arrived.  There are almost a dozen books, but only one video so far, Tantek Çelik’s 2 and a half hour video.

I recently viewed it and it was good but not great.  Almost the first 30 minutes is a discussion on the history of web development, HTML and XHTML.  Also, most of the video is of Tantek sitting behind his desk talking to the camera.  I would much rather see the code he is talking about or even the points he is making in slideshow format.

A great point about this video is that it comes with a 95 page pdf book outlining all the main points for HTML5.  There is also a 40 page booklet attached to the DVD.

Overall, I give the video 7.5/10.  It is not too expensive, so if you have £20-30 pounds to spare, it can be an easy way to learn about HTML5 without breaking the bank.

Posted in Non-technical | Tagged | Leave a comment

CSS 3 Helper Tools Websites

There are some great little sites that have brilliant tools to quickly and easily help you develop and enhance your CSS 3 stylesheets.  A list of those I know about right now are below.

css3.mikeplate.com For interactive css 3 code generation, this site does it all.  Simply point, click and edit the value you want to change and see the demo display immediately take effect.  The CSS 3 code needed is then shown at the bottom of the page.  There are even bars to drag left and right to edit attribute settings.

border-radius.com A one-page interactive page that will generate the code needed to produce a rounded corner for one, two, three or four corners of your box.

css3please.com A niche site that allows developers to edit browser sensitive CSS 3 attributes more easily.  When you change a browser sensitive attribute in their display page, the code is automatically updated to correct for other browsers.

CSS Lint  Though this isn’t CSS 3 specific, I just had to list it anyway.  Like it’s cousin JS Lint, it is an automated too to help you find inefficiencies in your code.  I love automated tools that do work for you!  The rules it gives you are sometimes general don’t have to be followed like gospel, but it does help.

Posted in Technical | Tagged | Leave a comment

Regular Expression – Prevent ALL CAPS words in Javascript

/\b[A-Z]{4,}\b/     This expression will detect whole words of at least 4 characters that are composed entirely of uppercase letters.

/[A-Z]{4,}/    This expression will detect four consecutive uppercase letters used anywhere in a string.  I prefer to use this one for text validation because I cannot think of a genuine case where a person would need have four or more uppercase letters used alongside lowercase letters.

Posted in Technical | Tagged , | Leave a comment

Regular Expression – Prevent All CAPS words in .net

The below formula will only accept strings that do not contain four or more consecutive uppercase letters.

@”^((?![A-Z]{4,}).\s*)*$”

Strings containing TLAs (Three letter acronyms) like SQL and USA are okay and will be accepted.

This can be used as part of a RegularExpressionValidator that would have code similar to below:

<asp:RegularExpressionValidator ID=”vld_txtDescription” runat=”server” SetFocusOnError=”true” ValidationExpression=”^((?![A-Z]{4,}).\s*)*$” ControlToValidate=”txtDescription” ErrorMessage=”Cannot use ALL CAPS words”  />

Note:If it is possible to crack the above regex, I will sent £20 to whoever does it.  Let me know in the Comment box.

For your interest, the unit tests for the above expression are below.  I apologise for WordPress being difficult with formatting:

using System;
using NUnit.Framework;
using System.Text.RegularExpressions;

namespace AllCapsPrevention
{
    [TestFixture]
    public class TestAllCapsRegex
    {
        private const string RegexValidString = @"^((?![A-Z]{4,}).\s*)*$";

        private Regex _regex;

        [SetUp]
        private void SettingUp()
        {
            _regex = new Regex(RegexValidString);
        }

        [TearDown]
        private void TearingDown()
        {
            _regex = null;
        }

        [Test]
        public void NoMatch____UUUUU_UUUUU____()
        {
            const string input = " UUUUU UUUUU ";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_llllll_UUUU_llllllll()
        {
            string input = "llllll UUUU llllllll";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_UUUUU_UUUUU()
        {
            const string input = "UUUUU UUUUU";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_lllllllUUUUllllllllll()
        {
            const string input = "lllllllUUUUllllllllll";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_llllllll_UUUUU_UUUUU_lllllllll()
        {
            const string input = "llllll UUUUU UUUUU lllllllll";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_llllllllUUUUUlllllUUUUUlllllllll()
        {
            const string input = "llllllllUUUUUlllllUUUUUlllllllll";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void NoMatch_llllllll_UUU_UUUU_lllllllll()
        {
            const string input = "llllllll UUU UUUU lllllllll";
            Assert.IsFalse(_regex.IsMatch(input));
        }

        [Test]
        public void Match_lllllll()
        {
            const string input = "llllll";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        public void Match_Ulllll_llllll()
        {
            const string input = "Ulllll_llllll.";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match_lllllll___________()
        {
            const string input = "llllll ";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match______lllllll_____()
        {
            const string input = " llllll ";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match______lllllll()
        {
            const string input = " llllll";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match______UUU_____()
        {
            const string input = " UUU ";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match____UUU__UUU_____()
        {
            const string input = " UUU UUU ";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match____UUU__UUU()
        {
            const string input = " UUU UUU";
            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match_Paragraph_No_Carriage_Returns()
        {
            string input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match_Paragraph_Has_Carriage_Returns_Ends_With_Text()
        {
            string input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += Environment.NewLine + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match_Paragraph_Has_Carriage_Returns_Ends_With_Newline()
        {
            string input = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += Environment.NewLine + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += Environment.NewLine;

            Assert.IsTrue(_regex.IsMatch(input));
        }

        [Test]
        public void Match_Paragraph_Has_Carriage_Returns_Begins_With_NewLine()
        {
            string input = Environment.NewLine + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += Environment.NewLine + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ";

            input += Environment.NewLine;

            Assert.IsTrue(_regex.IsMatch(input));
        }
    }
}
Posted in Technical | Tagged , | Leave a comment