Archives

Archives / 2018
  • Looking Back at 2018

    The end of the year is typically a time to look back – here’s my personal list of programs and technologies that played an important role for me in 2018.

    Visual Studio Code: It keeps getting better and better

    This editor-becoming-an-IDE needs no introduction. I have included it in this list because 2018 was the year where I started doing meaningful work beyond editing HTML/[S]CSS files in Visual Studio Code.

    For my purposes, it does not replace “classic” Visual Studio, but complements it. It’s not uncommon for me to debug ASP.NET Core and TypeScript code in Visual Studio Code as well as WPF code in Visual Studio 2018 at the same time (in a project where SignalR is used for Desktop Client <-> Server <-> Web Client communication).

    I’m extremely impressed by the ecosystem of extensions (e.g. Live Sass Compiler, Live Server) as well as the ongoing development with its monthly releases.

    Linea Sketch on iPad Pro: So good, it’s almost worth buying the hardware for

    I love Linea Sketch, which is an iPad app for (as the name implies) sketching. When I tried out various graphics applications for my 2018 iPad Pro, I was looking for something that would allow me to quickly draw UI sketches and illustrations for presentations without much overhead. Linea Sketch caught my attention because of the combination of simplicity and power. Two highlight features of the app are “ZipLine” and “ZipShape”, which let you quickly draw straight lines, circles and polygons without breaking your flow of work with the pen.

    Take a look at the Linea Sketch website to learn more about this fantastic app.

    UWP: I wanted to like it, but what a disappointment…

    I already wrote a bit about my frustration with the Universal Windows Platform (UWP) in the introduction to my previous blog post.

    Obviously, each new platform comes with a learning curve. If you have a clear vision of what you want to develop and are learning how to do it along the way, you are bound to take longer than expected. What happened with UWP, though, was that I encountered problems that too often became roadblocks for hours or sometimes days. If you get silent crashes or low-level exceptions with an HRESULT that basically says, “something went wrong”, the only thing you can do is to comment out code you have just written up to a point where the program is working again. That reminded me very much of the early Silverlight days (version 2 and 3), Back then, error messages only became helpful in later versions (I remember version 4 and 5 as being good enough).

    Web searches showed me that I wasn’t alone. Every so often, a question on a forum would made me go “yeah, I’d like to know an answer to that, too”. Unfortunately, often only reply would clearly indicate that the original post was only scanned for keywords, not actually read, let alone understood. Obviously, this is not a specific UWP problem. It’s just that other technologies seem to have reached a critical mass of users, so that e.g. on StackOverflow, additional comments and answers appear quicker and in larger numbers.

    The final straw for me were silent crashes of the Windows App Cert Kit, which had worked on my machine earlier. Searching for a solution, I came across Microsoft forum threads reporting WACK problems that went on for months, with no real solution in sight.

    I don’t know whether the WACK problem has been solved now, or whether UWP in general has become friendlier in terms of developer experience. But frankly, I have stopped caring. After all, we’re talking about programming as a hobby. Maybe I’ll revisit UWP in a few years – but for now, I have moved on.

    And by the way: I actually do like UWP APIs. They make e.g. creating a thumbnail of a media file or determining the length of a video file super-easy. But I can use these APIs from a WPF program as well, so that’s exactly what I’m doing now.

    ASP.NET Core (Web API, SignalR): A positive surprise

    While working with UWP was hard work for every step along the path, ASP.NET Core was clearly the opposite experience for me. Whenever I ran into a problem, I found a sample or some forum or StackOverflow post that helped me find a solution. And unlike with UWP, where I came from a WPF and Silverlight background, I didn’t have much prior knowledge.

    To put things in perspective:

    • I started with version 2.1, i.e. I surely skipped a lot of the problems of the 1.x days.
    • I found a great starting point with the SignalR with TypeScript and WebPack sample.
    • I use ASP.NET for non-UI, server-related functionality that is limited in scope.

    So, your mileage may vary. For me, the positive initial experience was a great motivation to learn more about the platform and to overcome the small problems that are simply a natural part of software development.

  • How to Make Chrome Kiosk Mode “just Work”

    There’s a reason why I haven’t blogged about UWP lately: The overall development experience (slow turnaround cycles, silent crashes, HRESULTs instead of error messages, you name it) drove me mad up to the point I scrapped my whole project, a digital signage solution, in early summer. Instead, I now use Chrome as my “render engine” and things are working pretty well. Without prior experience in using ASP.Net Core, WebAPI and SignalR, I have been able to whip something up to be ready for the 2018/19 Basketball season.

    During development, I had to figure out

    1. how to use Chrome without any… chrome (i.e. no title, adress or tool bars),
    2. how to move the Chrome window to the secondary screen,
    3. how to close Chrome from code and
    4. how to still be able to use Chrome for browsing during development.

    tl;dr: On https://github.com/RWeigelt/ChromeKioskModeDemo you find a small demo project (C#/WinForms for simplicity) that’s pretty self-explanatory.

    Problems #1 and #2 are easy: Chrome has a so-called kiosk mode (command line parameter --kiosk http://www.example.com) that will display the specified web page in full-screen mode. Another command line parameter deals with with positioning (--window-position=top,left). In the demo code you’ll see other parameters, they force the window size for a cleaner startup.

    Problems #3 and #4 turned out to be connected to each other.

    One might wonder what’s so hard about closing Chrome from code. Don’t you just start a process with Process.Start and remember the returned Process instance, to later call its CloseMainWindow method? What could possibly go wrong?

    Well, for starters, that Process instance may live shorter than expected. If you have a couple of Chrome windows and/or tabs open, Chrome will do a lot of process management behind the scenes – and “your” process may not be the one displaying the requested web page.

    On the other hand, if you go from zero Chrome windows to one window with a single tab, things are nice and easy. Now while you could force yourself to use a different browser during development, you never now whether there isn’t some Chrome window open later in production.

    Fortunately, if you specify a different “user data directory” (--user-data-dir=directory) when starting Chrome, you can achieve this “one window, one tab, one process” scenario even if you have many windows and tabs open.

    For details, take a look at the code on https://github.com/RWeigelt/ChromeKioskModeDemo. This C#/WinForms project shows a form with two buttons:

    • “Open Chrome” will open http://www.example.com in full-screen mode on the second monitor (sorry, you have to have a second monitor for the demo).
    • “Close Chrome” closes the Chrome window without affecting any other Chrome windows.

    Note that this is not a library, just some code I have taken from my solution (stripped down for clarity). You’ll want to adapt it to your needs anyway. Have fun with it!

  • Emaroo 4.3 – Support for Adobe CC 2019 / VS Code 1.28

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, VS Code, Word, Excel, PowerPoint, Photoshop, Illustrator and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on files and folders with custom actions!

    About this Release

    • Added: Support for Photoshop/Illustrator/InDesign CC 2019.
    • Updated: Support for Visual Studio Code 1.28 (changes regarding of most recently used files). Previous versions of Visual Studio Code are still supported.
    • Changed: Emaroo no longer looks for Photoshop/Illustrator CC versions prior to 2018 by default. This does not affect support for CS6 versions (which some users keep for compatibility reasons).

      If you still need support for older CC versions, you can enable it as follows:

      • Close Emaroo
      • Start Notepad as Administrator
      • Open the file Emaroo.exe.config in the installation directory (usually C:\Program Files (x86)\Weigelt\Emaroo)
      • Set SearchForOldAdobeCCApplications option to True
      • Save the config file and start Emaroo.
  • Design/UI/UX-Praxiswissen im Dezember in Berlin

    Am 11. Dezember halte ich im Rahmen der GUI&DESIGN 2018 den Workshop “Von Null auf GUI - Design/UI/UX-Praxiswissen für Entwickler”. Auf der Hauptkonferenz (12./13. Dezember) folgt dann mein Vortrag “Kochrezepte für die Gestaltung von GUIs”.

    Ich freue mich schon sehr auf die Konferenz!

    Zum einen, weil der Workshop und der Vortrag viel Spaß machen und das Feedback danach immer sehr positiv ist – mein Stil aus “praxisorientierter Abstraktion” scheint gut anzukommen. Bei der Developer Week in Nürnberg hatte ich den Vortrag vor dem Workshop-Tag gehalten und plötzlich saßen im Workshop drei zusätzliche Teilnehmer, die ihre ursprüngliche Workshop-Buchung kurzfristig über den Haufen geworfen hatten.

    Zum anderen, weil ich tatsächlich mal die Konferenz komplett genießen kann, denn dieses Jahr hat es zeitlich gepasst. Das Programm ist noch nicht vollständig, aber die Vorträge, die bereits online sind, klingen sehr vielversprechend.

    Alle Infos zu Konferenz: https://gui-design.ppedv.de/18

  • Emaroo 4.2.1 – Bugfix for VS Code Workspaces

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, VS Code, Word, Excel, PowerPoint, Photoshop, Illustrator and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on files and folders with custom actions!

    About this Release

    This is a small bugfix release that addresses a problem with Visual Studio Code workspaces.

    Thanks to Jochen Manns for reporting the issue and providing repro information that helped fixing the bug.

  • Emaroo 4.2 – Update for Visual Studio Code 1.26

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, VS Code, Word, Excel, PowerPoint, Photoshop, Illustrator and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on files and folders with custom actions!

    • Download Emaroo on www.roland-weigelt.de/emaroo
    • Get ready-to-use custom actions on GitHub, e.g.
      • Open a Visual Studio project/solution in a specific version of Visual Studio
      • Open the Visual Studio developer command line
      • Open a file or folder in Visual Studio Code
      • Open a folder in Git Bash or Git GUI
      • Attach a file to a new email in Outlook
    • Learn how to write your own custom actions in a quick step-by-step guide.

    About this Release

    The recent release of Visual Studio Code 1.26 brought a couple of changes that made it disappear from Emaroo. With VS Code being one of the tools and applications that I constantly launch from Emaroo, that is obviously a bad thing.

    Fortunately I had a more or less finished version 4.2 that was just waiting for an important reason for a release.

    Other release notes:

    • Changed: The settings for Show hidden and Show missing now work across tabs and are persisted when exiting Emaroo.
    • Improved: Reduced flicker when changing tabs.
    • Fixed: On some systems a black line appeared at the bottom of the VS2017 tab.
    • Workaround: In case the MRU list for Visual Studio 2017 shows only old items (or none at all), you can now switch the strategy how the MRU items are determined. See the ReadMe in the ZIP file for more information.

    A big Thank you! to Darren Schroeder for his support (technical info, example code, testing).

  • ASP.Net Core: Slow Start of File (Video) Download in Internet Explorer 11 and Edge

    While experimenting with the <video> tag on an HTML page with a web API endpoint as the source (ASP.NET Core 2.1.1), I noticed that the (not auto-playing) videos

    • appeared immediately in Chrome and Firefox,
    • but took a few seconds in Internet Explorer and Edge to show up on the page.

    This is what the code in my controller looked like:

    [HttpGet("{id}")] // api/video/example
    public IActionResult GetVideoByName(string id)
    {
    	// ...
    
    	var path = Path.Combine(@"D:\Example\Videos", id + ".mp4");
    	return File(System.IO.File.OpenRead(path), "video/mp4");
    }

    Searching the web for the obvious keywords (IE11, ASP.NET Core, file, stream, slow, download, etc.) yielded lots of results for all kinds of problems. In the end I found out that I needed to enable something called “range processing” (pardon my ignorance, I’m more of a UI guy than a networking expert).

    Fortunately, ASP.NET Core 2.1 offers a (new) overload for the File() function with a boolean parameter aptly named enabledRangeProcessing. So the solution is to set that parameter to true:

    	return File(System.IO.File.OpenRead(path), "video/mp4", true);
    
  • Emaroo 4.1 – Hide Those Tryout Visual Studio Projects!

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, VS Code, Word, Excel, PowerPoint, Photoshop, Illustrator and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on files and folders with custom actions!
     

    • Download Emaroo on www.roland-weigelt.de/emaroo
    • Get ready-to-use custom actions on GitHub, e.g.
      • Open a Visual Studio project/solution in a specific version of Visual Studio
      • Open the Visual Studio developer command line
      • Open a file or folder in Visual Studio Code
      • Open a folder in Git Bash or Git GUI
      • Attach a file to a new email in Outlook
    • Learn how to write your own custom actions in a quick step-by-step guide.

    About this Release

    With Emaroo 4.1, you can now hide files or directories This is nice for hiding all those small tryout projects (“App1”, “App2”, etc.) that you are just not quite ready yet to delete on disk.

    Open the context menu and check the “Hide in list” option:

    20180705_HideInList

    To make a hidden list item visible again, check the “Show hidden” checkbox (to show all hidden items)…

    20180705_ShowHidden

    …and open the context menu on the item you want to show again.

    Then uncheck the “Hide in list” option:

    20180705_ShowAgain


    The release also fixes a couple of bugs, so an update is definitely recommended!

    Read the full release notes on the Emaroo website.

  • Emaroo 4 – Custom Actions on Overdrive!

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, VS Code, Word, Excel, PowerPoint, Photoshop, Illustrator and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on files and folders with custom actions!
     

    • Download Emaroo on www.roland-weigelt.de/emaroo
    • Get ready-to-use custom actions on GitHub, e.g.
      • Open a Visual Studio project/solution in a specific version of Visual Studio
      • Open the Visual Studio developer command line
      • Open a file or folder in Visual Studio Code
      • Open a folder in Git Bash or Git GUI
      • Attach a file to a new email in Outlook
    • Learn how to write your own custom actions in a quick step-by-step guide.

    About this Release

    Version 4 of Emaroo is here, with major improvements for custom actions:

    • New dialog for editing custom actions.
    • New debug dialog for previewing how text macros are expanded before executing a custom action.
    • New clipboard format for quickly sharing custom actions.
    • New macros for more portable custom actions.
    • Tooltips for your custom actions.

    Read the full release notes on the Emaroo website.

    The New Clipboard Format for Sharing Custom Actions

    When you copy a custom action on the settings tab…

    20180614_SettingsTab

    …Emaroo places a text on the clipboard that looks something like this:

    §§!F5[*J,l;DzzK6yn}|N|U1op[BMW+uMsNa5QD-fRa#}~TEgEV^I7O#-1^kHDi;°(*VI|84#6XX*4%b
    E{4A(+*Na;s,sUYLqQCjdDvmGd6aQ0oQ4Mek-|cHCVcXi:Z]BHkuh5|nt°3A]dkKiNMO-*{}apX+T=y^
    10ETC°i5lL^Qcm~jSi,kSgax1Xhv*§§

    You can then paste the custom action into a mail or chat window, post it on your website, Facebook etc. to share it with others.

    The text format does not use characters that have to be escaped e.g. when inserting the text into HTML. You can also add or remove spaces or linebreaks as long as you keep the “§§” at the start and the end.

    File-based Sharing of Custom Actions

    Emaroo still does (and will continue to) support import from/export to JSON files (“*.action.json”) for version control and backup purposes – it’s always good to have the source Winking smile.

  • Hello World: The Film, Take 2

    Back in November I blogged about Shawn Wildermuth’s planned documentary about software development. Unfortunately, the Kickstarter campaign to fund the project didn’t get enough traction, so it was was cancelled.

    Now, a few months later, Shawn has started another crowd-funding campaign, this time on Seed&Spark – and things are looking good: At the time of this writing, the funding has reached 85% of the goal.

    So head over to https://www.seedandspark.com/fund/hello-world-film, read what the project is about, take a look at the big names in the documentary and maybe add your support to the project!

  • Open Git Bash for Recent Visual Studio [Code] Projects/Folders with Just a Few Keystrokes

    Emaroo is a free utility for browsing most recently used (MRU) lists of a variety of programs for developers and designers.

    Download Emaroo on www.roland-weigelt.de/emaroo.

    Tip: When you pin Emaroo to the taskbar and drag the icon to the left, you can quickly start it by pressing the Windows key and a number (e.g. Win+1 if the icon is in the leftmost position).

    In addition to opening files or folders and a couple of other built-in features, Emaroo also allows used-defined custom actions. A custom action runs an executable of your choice, with arguments and/or a working directory specified using macros similar to those for the pre-build/post-build events in Visual Studio. You execute a custom action either via the context menu or via one of the hotkeys Ctrl+1, …, Ctrl+9, Ctrl+0.

    A Custom Action for Git Bash

    • Copy the following URL (direct link to one of the custom actions available on GitHub):
      https://raw.githubusercontent.com/RWeigelt/EmarooCustomActions/master/git/GitBashHere.action.json
    • Launch Emaroo
    • Open the settings page:
      20180404_SettingsPage
    • Click "Import"
    • Paste the clipboard content into the "File name:" field and press the “Open” button
    • Change to the Visual Studio page
    • You'll find the custom action in the lower left corner…
      20180404_CustomActionInFooter
      …and in the context menus of the list items:
      20180404_ContextMenu
    • Repeat the steps for the other Visual Studio versions and/or Visual Studio Code

    How It’s Done

    Let’s take a look how the custom action is defined:

    • Either open the context menu on the custom action in the lower left corner of the Visual Studio tab…
      20180404_ContextMenuInFooter
      …or, if you are on the settings tab, press the pen icon on the custom action:
      20180404_EditIconInCustomAction
    • This will open the following dialog:
      20180404_EditDialog
    • For the Git Bash custom action,
      • the “Executable” field contains the full path of git-bash.exe,
      • we don’t need anything in the “Arguments” field
      • and we’ll start git-bash.exe in the directory of the currently selected project in the Visual Studio MRU list (using the $(DirPath) macro).

    See also

  • Emaroo 3.6.1 – Fix for Word/Excel/PowerPoint 2016

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, Word, Excel, PowerPoint and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on the MRU items! And all this with just a few keystrokes or mouse clicks.

    About this Release

    This release fixes an issue where some variants of Word/Excel/PowerPoint 2016 and/or their MRU lists were not displayed.

    See Also

  • Design/UI/UX-Praxiswissen für Entwickler in Köln und Nürnberg

    Am 3. Mai 2018 halte ich auf der dotnet Cologne 2018 wieder meinen Workshop “Von Null auf GUI - Design/UI/UX-Praxiswissen für Entwickler”.

    Am 27. und 28. Juni bin ich in Nürnberg auf der Developer Week 2018. Am 27. Juni spreche ich zunächst in einer 60-Minuten-Session über “User Interface Patterns - Kochrezepte für die Gestaltung von GUIs”, am Tag darauf folgt dann der ganztägige Design/UI/UX-Workshop.

    In meinen Workshops vermittle ich Entwicklern ohne UI/UX-Vorkenntnisse sowohl ein Grundverständnis für die Materie, als auch das notwendige Handwerkszeug für die tägliche Arbeit. Vortragsteile und praktische Übungen wechseln sich dabei ab, um das Erlernte in Einzel- und Gruppenarbeiten direkt vertiefen zu können.

    Ich spreche u.a. über folgendes:

    • Wissenswertes über die visuelle Wahrnehmung des Menschen: Warum ist man manchmal einfach "blind", wenn man einen Button in einer GUI sucht, aber nicht findet?
    • Visuelles Design für Nicht-Designer: Ein paar Grundregeln, mit denen man jede Anwendung aufwerten kann.
    • User Experience: Wie Gefühle das Handeln von Anwendern bestimmen und wie das Wissen darüber hilft, bessere Bedienoberflächen zu gestalten.
    • Das passende Werkzeug zur richtigen Zeit: Mit Stift und Papier Zeit und Geld sparen - auch wenn man gar nicht zeichnen kann.
    • Denken in UI-Patterns: Mit der richtigen Herangehensweise besser entscheiden können, was man sich von anderen UIs abgucken kann.

    Wer als Entwickler gerne bessere GUIs gestalten würde, sich aber bisher die Frage nach einem Einstieg mit verwertbaren Erkenntnissen für den Alltag gestellt hat, für den ist dieser Workshop genau das Richtige.

    Anmeldung

    • dotnet Cologne 2018: Die Anmeldung für die Workshops startet am 7. März um 12:00, in dem Preis für den Workshop ist auch die Teilnahme am Konferenztag am 4. Mai enthalten.
    • Developer Week 2018: Die Anmeldung ist ab sofort möglich.
  • Emaroo 3.6.0 Released – Run or Read!

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, Word, Excel, PowerPoint and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on the MRU items! And all this with just a few keystrokes or mouse clicks.

    About this Release

    Visual Studio solution directories often contain batch files and/or HTML or Markdown files.

    Until now, my usual workflow to open one of them from outside of Visual Studio was to…

    • press Win+1 to start Emaroo (which I have pinned to the taskbar)
    • select the solution
    • hit Ctrl+E to open the Windows Explorer
    • browse through the (sometime long) list of files and
    • open the file I was looking for.

    Version 3.6.0 adds a new feature to make this much easier.

    Either I open the context menu by right-clicking the list entry for the solution…

    20180227_ContextMenu

    …or – even faster – I hit the hotkey Ctrl+R (to run or read):

    20180227_Popup

    See Also

  • Emaroo 3.5.0 Released – now Supporting Affinity

    Emaroo is a free utility for browsing most recently used (MRU) file lists of programs like Visual Studio, Word, Excel, PowerPoint and more. Quickly open files, jump to their folder in Windows Explorer, copy them (and their path) to the clipboard - or run your own tools on the MRU items! And all this with just a few keystrokes or mouse clicks.

    About This Release

    The Adobe Creative Cloud set of applications is not exactly cheap, especially if all you use is Photoshop and Illustrator. If you need some design tools for working on typical graphics for software projects, taking a look at the non-subscription, competitively-priced alternatives Affinity Photo (bitmap graphics) and Affinity Designer (vector graphics) may be worth a try.

    Emaroo now supports these two applications. And if you have Photoshop and/or Illustrator installed on your machine, you can open files from their MRU lists in the corresponding Affinity application.