Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

sysrpl sysrpl
  • Microsoft insists: YOU WILL LOVE OUR ALL CAPS ​MENUS!!!!1!!​!

    Last month I created a post referring to Microsoft's new design changes for the next Visual Studio. The reaction from most people here, and a sentiment I also share, was that the ALL CAPS menus had to go.

    Well Microsoft has thought it over and decided styling Visual Studio to in some ways fit in better with the metro look is more important than our opinions. Read more here:

    http://blogs.msdn.com/b/visualstudio/archive/2012/06/05/a-design-with-all-caps.aspx

    My take: Visual Studio should be a friggin' IDE meant for programming ease and comfort. But I guess Microsoft sees it differently. They use updates to Visual Studio is to herd developers in the direction Microsoft wants them to follow i.e. Metro apps on the Microsoft app store.

  • Question about Visual Studio Style

    @Blue Ink: Ah okay. So when they announced the background was changed to a lighter shade of grey, they are setting disabled icons are a lighter shade of grey, but enabled icons stay their current state of grey. Got it. Thanks!

  • Question about Visual Studio Style

    If most button, menu, and node icons in the new Visual Studio studio are now grey as opposed to colored, then what color are disabled the icons?

  • Visual Studio Updates

    The people over at the Visual Studio Blog have posted an update describing changes to the Visual Studio interface in the soon to come first release candidate.

    My reaction:

    I really don't get why Microsoft feels the need to change to a monochromatic UI theme in a developer tool just because the next version of Windows has monochromatic tiles and icons. I also don't understand why Microsoft feels compelled to MAKE TEXT ALL CAPS IN AREAS just because the next version of Windows might do that in places.

    Visual Studio 2010 or even 2005 icons were sufficient and I didn't hear anyone complain that the run triangle button was green or the terminate square was red. Note the "adjusted the grays within the icons to eliminate any fuzziness or halo effect". Ugh.

    Newsflash to Microsoft, software developers don't care about an IDE which matches the newest Windows themes. We want the UI we use at all day to be as clear as possible, neat, organized, to the point, NOT OVERLY LARGE IN PLACES, something which fast feel snappy, is bug free (as possible), and importantly comes with great features.

  • Android ported to C#

    http://blog.xamarin.com/2012/05/01/android-in-c-sharp/

    It looks like they guys over at Xamarin are having fun. They've opened up their improvements to Sharpen, a Java to C# converter, and used it to port Android 4 (Ice Cream Sandwich) to C#. The C# version runs much faster (benchmark in the link above).

    Everything is on github including XobotOS (the name they've attached to the port) and Sharpen.

    https://github.com/xamarin/XobotOS

  • New C++ runtime library

    @Sven Groot: I've wrtten my own string class which stores strings as reference couted unicode strings. It has constructors to handle a few different string types, and as you know with c++ this allows you to construct an object with a simple assignment.

    Regarding WriteLine(), it is type safe, but I had to resort to writing many templated overloads

    WriteLine(const String& s);
    
    template <typename A0>
    WriteLine(const String& s, const A0& a0) {}
    
    template <typename A0, typename A1>
    WriteLine(const String& s, const A0& a0, const A1& a1) {}
    

    Etc ... I also did the same thing with my Format() function. There is a single object hierarchy structure to my classes with the root being class ValueType. ValueType provides a ToFormat(const String&) method which allows customization of how classes can be formatted.

    When you say Format("Hello {0:base64}", memoryBuffer), the Format() function parses out "base64" from the 0th argument and passes that to a0.ToFormat(format) ... where format holds the value "base64".

    In this way any class can provide it's own formatting by simply override ToFormat(). For the default types like int, bool, double, etc I provide default formatters, eg: Format("{0:$#.##|-20}", dollarsAmount). Might return: "                 $150.00"

  • New C++ runtime library

    @c_str: /ignore

  • New C++ runtime library

    @c_str:

    I am trying to create idioms whereby when code is written with my library it feels like a higher level language.

    int i = 0; std::for_each(nums.begin(), nums.end(), [&](int& n){  i += n; });
    
    // versus
    
    int i = 0; ForEach(n, nums) i += n; 
    
    // or simply
    
    auto i = Query(nums).Sum();

  • New C++ runtime library

    I am working on a library for C++ which is small, has no dependencies other than itself (i'm not using boost), works on all platforms, and most importantly is as friendly as C#.

    This morning I finished testing my C++ implementation of linq. Here is an example of what it looks like. Your feedback is appreciated:

    Edit: I expanded the examples

    // Enumerable queries in C++
    // This program searches the current directory
    // And selects results using expression nodes
    
    #include <Codebot/Packages/System.h>
    #include <Codebot/Packages/Expressions.h>
    
    using namespace Codebot;
    using namespace Codebot::IO;
    using namespace Codebot::Text;
    using namespace Codebot::Expressions;
    
    void TestFileFind()
    {
      String SearchPath = "*";
      if (Application::Args().Length() > 0)
        SearchPath = Application::Args()[0];
      FileFind find;
      find.Search(SearchPath);
      auto query = Query(find)
        .OrderBy([] (FileResult a, FileResult b)
        {
          if (a.Attributes.Contains(FileAttribute::Directory))
          {
            if (b.Attributes.Contains(FileAttribute::Directory))
              return a.Name < b.Name;
            return true;
          }
          if (b.Attributes.Contains(FileAttribute::Directory))
            return false;
          return a.Name < b.Name;
        });
      ForEach(item, query)
        WriteLine(item.ToString());
      auto bytes = query
        .Select<int>([] (FileResult a) { return a.Size; })
        .Sum();
      WriteLine("{0|-31} total bytes\n", bytes);
    }
    
    void TestNumbers()
    {
      Array<int> numbers = {7, 4, 2, 8, 3, 6};
      auto q = Query(numbers);
      WriteLine("The first value is {0}",
        q.FirstOrDefault());
      WriteLine("The count value is {0}",
        q.Count());
      WriteLine("The sum value is {0}",
        q.Where([] (int i) { return IsOdd(i); }).Sum());
      WriteLine("The average value is {0}",
        q.Average());
      WriteLine("The min value is {0}",
        q.Min());
      WriteLine("The max value is {0}",
        q.Max());
      q = q.Where([] (int i) { return i > 2 && i < 8; })
        .OrderBy([] (int a, int b) { return a > b; });
      WriteLine("List: {0:list}\n", q);
    }
    
    void TestStrings()
    {
      Array<String> names = {"John", "Terrance", "Ralph", "Carl", "Stanley"};
      auto q = Query(names);
      WriteLine("The first value is {0}",
        q.FirstOrDefault());
      WriteLine("There are {0} items",
        q.Count());
      WriteLine("The sum is {0}", q
        .Where([] (String s) { return s.Contains("a"); }).Sum());
      WriteLine("The minimum value is {0}",
        q.Min());
      WriteLine("The maximum value is {0}",
        q.Max());
      q = q.Where([] (String s) { return s > "Mary"; })
        .OrderBy([] (String a, String b) { return a.Length() < b.Length(); });
      WriteLine("List: {0:list}\n", q);
    }
    
    int main()
    {
      return Application::Run({TestFileFind, TestNumbers, TestStrings});
    }
    
    
    /*
    Output:
    
    .                           Dir
    ..                          Dir
    Debug                       Dir
    .cproject                 14030  2012-04-12 14:41:33
    .project                   2508  2012-04-14 08:20:42
    Person.h                   1726  2012-04-12 22:59:28
    Widget.cpp                  871  2012-04-12 01:34:43
    Widget.h                   1663  2012-04-12 22:59:36
    main.cpp                   2415  2012-04-15 20:32:45
                              23213 total bytes
    
    The first value is 7
    The count value is 6
    The sum value is 10
    The average value is 5
    The min value is 2
    The max value is 8
    List: {7, 6, 4, 3}
    
    The first value is John
    There are 5 items
    The sum is TerranceRalphCarlStanley
    The minimum value is Carl
    The maximum value is Terrance
    List: {Ralph, Stanley, Terrance}
    
    */

  • C++ and Delphi/C# ​compatibili​ty

    I wanted to put this out there and get your opinions.

    I've been working on kind of large C++ library which tries borrow as many idioms from Delphi and C# as possible, which can integrate well with C#/Mono/Delphi (and Free Pascal), and works on all platforms. It's ready for me to release but I want to write a few more demos. It'll be on git hub or some other public open source repository soon.

    Here is a test application I ran this morning which exports functions and interface objects to a C++ application:

    http://codebot.org/c-code.txt
    3 files. Delphi source unit, C++ header importing Delphi function, C++ main to test it:

    Another example. A very small and fairly robust multi-threaded web server:

    http://codebot.org/webserver.txt
    1 file. C++ main test on Windows, Linux and MacOS X

    I am using some C++11 features and will probably use more as MSVC and GCC support for C++11 improves. The purpose of this library is to make C++ more like Delphi and C# and to also integrate well with Delphi. And also of course, to work in places Delphi has a hard time with.

    What the library includes so far is:

    Tested cross platform support for Windows, Linux, MacOS X, Android
    Works with MSVC and GCC (Tested with no warnings/errors in Visual Studio 2010 and Eclipse with CDT)
    Unified object hierarchy with a base value type class
    Unified exception handling with base exception class
    Exception handling tracks the method/function causing the error
    String type with copy on write memory management
      Fairly complete set of string methods including:
      Split/Join, SubString, IndexOf, FirstOf, LastOf, Trim, UperCase, LowerCase ect ...
      regular expressions
    Custom event handler types
      Example: listOfStrings->OnChange += event(StringsChangeMethod);
    Automatic reference counting and disposal for items derive from object class
    Unified file systems, directory, and path operations
    Date and time classes
      Example: DateTime d = DateTime::Now().AddDays(-1); WriteLine(d.ToFormat("DDDD, MMMM D YYYY h:mm am/pm"));
      Output: Tuesday April 3 2012, 10:43 am
    Stream class with MemoryStream, FileStream, ResourceStream, StringStream
    Interop support for interfaces types (COM type interfaces) on all platforms
      Example: Interface<INode> node; node = document->Root();
    RTTI operations Is<T> and As<T>. 
      Example if (Is<Document>(node)) As<Document>(node)->Save("resut.xml");
    Cross platform XML library with full xpath and xslt support
    Every class can work with custom formatting (WriteLine, Format, ToFormat)
      Example: WriteLine("The value is {0:trim} and PI is {1:#.##}", " Hello ", Math::PI)
      Output: The value is Hello and PI is 3.14
    A few generic "ready to go" container types
    Threading support on all platforms
    Unit testing framework

    Feedback appreciated.
    It will be of git hub or some other online repository soon.