Richard Feich

Rich's Blog

Author: rich (page 1 of 2)

All that lives must die, Passing through nature to eternity.

Fishing Tugs – Door County, Waters End 1998

Midnight Repairs by Bob Hoover.

A VW Christmas Story

http://feich.com/christmas/

Fishing Tug C. W. Bohman

Fishing Tug C. W. Bohman basking in the morning light at Waters End, Door County, Wisconsin 1998.

Built at Algoma, Wis. in 1980 by Charles and Mike Bohman, and operated from that port. An all-steel 42 ft. fish tug equipped with a Murphy diesel. The boat was later sold to Mike LeClair, Jacksonport, Wis. Confiscated by the state of Michigan, in an illegal fishing matter, the boat was then sold back to another owner in Wisconsin.

TMAX 400 and HC-110

I love TMAX 400 (TMY) B&W film for general shooting; it’s a great film. Lately, I’ve been dialing in my TMY development process using developer HC-110 , which provides fine grain,  high acutance and excellent  tonal contrast control.  Also, HC-110 comes in a liquid concentrate that is easy to work with and has an unbelievably long shelf life; it’s very economical to use. I mix Dilution-B (1:31) directly from the syrupy concentrate, and use it one-shot. I typically like to process at 68°F; however in late August my cold tap water is almost exactly 72°F which I use and adjust my processing time accordingly. With this developer, I shoot TMAX 400 at an exposure index of 200, which gives me great shadow detail and negatives that print and scan well.

Density Plot (click for detail)

A sample photo scanned from the test roll:

Popokikeiki (a.k.a. flame-head) shot on TMAX 400 (EI 200) developed with HC-110-B @ 72F for 5.5 minutes (Nikon F100, Nikkor 50mm 1.8D)

Dependency Injection and the Umbraco CMS Platform

On many projects I have used Ninject as my go-to dependency injection framework; it’s open source, flexible,  has good support, and a lot of extensions; but…it’s slow! Daniel Palme did some excellent work comparing the performance of various DI containers; see his results. Here is one of his conclusions supported by data:

Ninject is definitely the slowest container.

With this information I investigated using  the Simple Injector  DI framework. So far, I have used it on ASP.NET Web Forms, MVC, Web API, and console type applications. It’s a great simple super-fast DI framework, and its open source. I recommend trying it out [nuget  package].

Simple Injector is an easy-to-use Dependency Injection (DI) library for .NET 4+ that supports Silverlight, Windows Phone, Windows 8 including Universal apps and Mono. Simple Injector is easily integrated with frameworks such as Web API, MVC,  WCF, ASP.NET Core and many others. It’s easy to implement the dependency injection pattern with loosely coupled components using Simple Injector.”

I have been using Simple Injector in my custom Umbraco projects. Here is how it gets wired-up in the OnApplicationStarted() method:


...
using SimpleInjector;
using SimpleInjector.Integration.Web.Mvc;
using Umbraco.Core;
using Umbraco.Web.Mvc;

...

public class UmbracoEventHandler : IApplicationEventHandler
 {
        ...

        public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            var appName = ConfigurationManager.AppSettings["ApplicationName"];
            var websiteUrl= ConfigurationManager.AppSettings["WebsiteUrl"];
            var connectionString = ConfigurationManager.ConnectionStrings["umbracoDbDSN"].ConnectionString;

            var memberRepoParms = new MembershipRepoParms
            {
                ApplicationName = appName,
                WebsiteUrl = websiteUrl,
                ConnectionString = connectionString,
                ApplicationContext = applicationContext
            };

            //Code for registering the repository class and DI
            // 1. Create a new Simple Injector container
            var container = new Container();

            // 2. Configure the container (register)
            container.Register<IMembershipRepository>(() => new MembershipRepository(memberRepoParms));
            container.Register<RenderMvcController>(() => new RenderMvcController());
            container.RegisterMvcControllers(Assembly.GetExecutingAssembly());

            // 3. Verify your configuration -- optional
            //container.Verify();

            // MVC Package - These two extension methods from integration package
            DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container));
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // 4. Use the container examples -- this code go in your custom controllers.
            // var repository = container.GetInstance<IMembershipRepository>();
            // var repository = DependencyResolver.Current.GetService<IMembershipRepository>();

        }
 }

File Backup Solution

Problem: I have various files scattered over my entire C-drive (or any drive, folder or library), certain files I would like to backup and organize in someway. It is extremely tedious to click-through folders to find these files. I wrote a utility to automate the process; it’s a console app written in C#. Basically,  I point it to a source drive, I tell it what kind of files I want and  what to paths to ignore, and specify output organization structure…and let it run.

GitHub Repository:   https://github.com/RichardFeich/FileBackUp
It needs a bit more testing and code clean-up; but it’s functional and I’m using it.

A little bit of setup is required:

  • exclude.txt — contains a list of paths not to scan, for example:
    C:\Windows
    C:\Program Files
    C:\Program Files (x86)
    C:\ProgramData
    C:\Users\Rich\AppData
    C:\Users\Rich\.nuget
    C:\ivms4200
    C:\Users\Rich\Documents\My Web Sites
    C:\Users\Rich\Documents\wp
    C:\Users\Rich\workspace
    C:\Python34
    C:\Users\Rich\Web
    C:\AMD
    C:\Users\All Users
  • extensions.txt — contains a list of file extensions to look for, for example:
    .jpg
    .jpeg
    .jpe
  • App.config settings:
    <add key=”SourceNode” value=”C:\” />
    <add key=”DestinationNode” value=”J:\FileBackup_temp” />
    <add key=”OrganizationFormat” value=”ByYear” />
    <add key=”UseMetadata” value=”true” />

SourceNode: the drive, library, or folder you wish to scan.
DestinationNode: where you wish to copy files to…the destination.
OrganizationFormat:   file organization at the destination, 4 possibilities

Flat — all files in one folder i.e. no hiearchy
ByYear — files organized by year of Create Date  (one level hierarchy)  ex. 2016
ByMonth — files organized by year and month of Create Date (two level hierarchy)  ex. 2016/Oct
ByDay — files organized by year, month, and date  of Create Date (three level hierarchy) ex. 2016/Oct/Oct03

UseMetadatatrue/false,  when set to true the Create Date will be pulled from metada (exif), if it exists. This is useful for digital photography.

I’ll improve this APP as needed for my purposes.

Umbraco CMS Platform

Umbraco is an open source content management system (CMS) platform written in C# built upon Microsoft’s .NET framework using ASP.NET MVC architectural model. Out-of -the-box, Umbraco is not a CMS per se, it’s really a platform for building a CMS; and an excellent one at that. I’ll been using this platform for 10+ years and I must say it has matured into a killer system for building websites and web-based applications. It has great architecture, super extensibility, and a fantastic development ecosystem (support, developers, plugins). Most importantly…the clients love the backoffice for managing content. The backoffice user-experience is fully customizable and components are implemented with AngularJS controllers and views.

To illustrate the power and extensibility of this system I am building a sample project and along the way I’ll explain various techniques and components. I am building an event management system, with grid calendars and event registration. More to come…

https://github.com/RichardFeich/UmbEventMgr

Features:

  • Hybrid Controllers (SurfaceRenderMvcController, RenderMvcController)
  • Dependency Injection using Simple Injector
  • Data access with Petapoco Micro-ORM and T4 templates
  • Strongly typed content access and views using Umbraco Models Builder
  • Responsive web design with Bootstrap
  • Google Maps integration
  • more…

Futura (typeface)

When I was a kid growing up in a small Wisconsin town, I remember riding my bicycle over to the local department store. At the end of the isle near the toy department there was a circular rack of pocket-sized books published by  “Golden Press”, typically edited or written by Dr. Herbert Zim;  the  Golden [science/nature] Guides . I loved these books; they were well written by experts in there field and covered a wide array of nature and science subject matter; they really fed my young curiosity at the time. When I could afford it, I would buy one of special interest to me, titles like: Photography, Color and Light, Rocks and Minerals, Oceanography, etc. I still have them in my library today.

As an adult, what is interesting about these books is the book design aspect. Each book is a highly readable package with simple straight-forward colorful illustrations, well laid out pages, good typography, organized into nourishing bites of information. The body copy typeface is Futura, which is a geometric sans-serif designed by Paul Renner and released in 1927 in Germany. Some may argue the Futura may not be the best choice for book body copy, but for this application it seems perfect. These books are pocket size,  set at a relatively small point. Futura is clean and elegant and has an appearance of efficiency and forwardness.

It consists of simple geometric forms: near-perfect circles, triangles and squares. It is based on strokes of near-even weight, which are low in contrast. The lowercase has tall ascenders, which rise above the cap line, and uses nearly-circular, single-storey forms for the “a” and “g”, the former previously more common in handwriting than in printed text.

“Futura is one of the most rhythmical sanserifs ever made. Its proportions are graceful and humane-close to those of Centaur in the vertical dimension. This helps to make it suitable for setting extended text.”

— Robert Bringhurst

Futura goes to the moon:

May this year give you the opportunity to follow your dreams, love like there is no tomorrow and smile unconditionally.

Happy New Year!

Older posts

© 2024 Richard Feich