I recently had the task to port a .Net mobile application to iOS, with Xamarin.iOS.
The application is not a game, but is based on the MonoGame game engine because it requires a lot of fluidity and some advanced multi-touch interactions with the user. Performances are therefore critical.

Most of the porting was simple and almost straightforward, but I struggled for a few days trying to meet the performance requirements: when idle, the app would behave correctly and be very fluid, but as soon as I was starting to actually use it and triggered some code, the fps dropped dramatically and most of the app was unresponsive for at least a few seconds…

The application was already working pretty well on Android, so I was really not expecting this.

After checking a lot of things in the code and in the Xamarin documentation without finding anything, I finally solved the problem after trying some last resort thing…More >

I spent my 3 months summer internship coding a Windows 8 application, and even though there now is a basic implementation of the INotifyPropertyChanged interface provided by Microsoft (BindableBase), I can tell you creating a view model for each view you need is very time consuming and boring, and not nearly as quick as I would like it to be.

Following my last post on benchmarking madness, here is a short one about finding .net classes or interfaces based on given criteria.

While writing my last post, I found myself having a hard time searching for classes implementing IEnumerable<T> without also implementing ICollection<T>.
Indeed, beside String, there is not so many…More >

What is the best way to know if an IEnumerable<T> contains at least one element?
I mean, what is the most optimized way to know this information?

Maybe the first thing that came to my mind was to do some .Count() > 0 check, but if you think of it, the Count() extension method would have to enumerate the entire collection to know its length. This seems a little overkill.More >

► ChangeLog…

Version 2.4, 2014-11-30
------------------------
- [fixed] force the working directory to be the one of the executable (so the .conf file is found when starting from the cli)
Version 2.3, 2014-03-28
------------------------
- [fixed] crash if more than one custom color effect is added without an associated hot key
- [added] (re)added the ShowAeroWarning configuration option from the version 1.*
- [added] check box next to the current color effect in the right click menu
Version 2.2, 2013-02-17
------------------------
- [fixed] avoid crash if a hot key cannot be registered
- [added] new ActiveOnStartup configuration option
Version 2.1, 2012-12-22
------------------------
- [fixed] crash on Windows 8 due to inter-threads calls
(this was not a problem on Windows 7)
- [added] new MainLoopRefreshTime configuration option
Version 2.0, 2012-12-14
------------------------
Major update:
- reworked entirely
- better performances
- smooth transitions
- graphic interface (minimal)
- configuration file:
- fine grained configuration
- custom hotkeys
- custom color effects
Version 1.14, 2014-11-30
------------------------
- [fixed] force the working directory to be the one of the executable (so the .conf file is found when starting from the cli)
Version 1.13, 2013-07-04
------------------------
- [added] implemented the configuration file for the version 1.*
- [added] configuration option to disable the message warning about aero being disabled
Version 1.12, 2012-12-14
------------------------
- [fixed] crash on Windows 8
Version 1.11, 2012-06-26
------------------------
- [added] new red and negative red filters bound on F9 and F10
Version 1.10, 2012-05-15
------------------------
- [fixed] infinite flickering on Vista (introduced in 1.8)
Version 1.9, 2012-04-16
------------------------
- [fixed] stupid bug if the Windows taskbar is vertical
Version 1.8, 2012-03-22
------------------------
- [fixed] execution is no longer prevented if aero is disabled (previous bug corrected)
however, the performances will still be horrible
Version 1.7, 2012-03-21
------------------------
- [fixed] works as expected when using custom DPI settings
Version 1.6, 2012-02-27
------------------------
- [fixed] crash on X86 on launch
- [fixed] prevent execution if aero is disabled
(prevent undesirable behaviours: black screens, 100% CPU usage...)
Version 1.5, 2012-02-16
------------------------
- [fixed] (internal) ColorMatrix implementation
- [added] new feature: choice between 9 inversion modes
(smart mode, etc... see readme for details)
Version 1.4, 2012-02-09
------------------------
- [fixed] does not crash anymore on Windows Vista
Version 1.3, 2012-02-01
------------------------
- [fixed] multi-screen should finally work!
after a lot of tests and coding, I re-thought completely the architecture
- [knownbug] in some screen configurations, if the primary screen if smaller than the other screen,
the second larger screen has a black border at its bottom.
It could be a bug in the Windows API...
Version 1.2, 2011-09-18
------------------------
- [fixed] multi-screen support (again) : bug with main screen on the right
Version 1.1, 2011-09-13
------------------------
- [fixed] multi-screen support
- [fixed] when halted while paused, the application never stopped
Version 1.0, 2011-09-06
------------------------
- Initial release

NegativeScreen is a Windows application allowing you to invert your screen colors.
Apart from accessibility matters, this software is especially useful when you are surfing on the internet in a dark room, and the screen is dazzling you.

NegativeScreen was designed to work without impacting the performances and fluidity of your computer.
Unlike the Windows Magnifier, which is also capable of such color inversion, it was specifically designed to be easy and convenient to use.

Different inversion modes are provided, including “smart” modes, allowing blacks and whites inversion, while keeping colors (about) the sames.

Normal

Simple Inversion

Smart Inversion

Usage

The color inversion takes effect immediately after starting the program.

NegativeScreen comes with a minimal graphic interface in the form of a system tray icon with a context menu.
You can toggle the inversion by clicking the tray icon, and access more features by right clicking it.

Along with these commands, you can also control NegativeScreen only by using hot keys. Read on…

Keep in mind you can always change these defaults by editing the configuration file.

Configuration

The version 2.0 (and 1.13) introduces a configuration file allowing to tweak almost everything in NegativeScreen.

You can now choose your own hot keys if you don’t like the defaults, and you can even add you own color effects!
This requires some knowledge in color matrices though.
I may add an easy way to build some in a future version…

If the configuration file (negativescreen.conf) is missing, you can use the “Edit Configuration” menu to regenerate the default one.

Should something go wrong after edition (bad hot key…), you can simply delete the configuration file, the internal default configuration will be used.

Windows XP Version

Unfortunately, the Windows Magnification API this application uses, is not available on Windows XP.
Therefore, I’m sorry to tell, there will be no XP compatible version of NegativeScreen.

Downloads

NegativeScreen is freely available, along with its source code, under GPL license.

► ChangeLog…

Version 2.4, 2014-11-30
------------------------
- [fixed] force the working directory to be the one of the executable (so the .conf file is found when starting from the cli)
Version 2.3, 2014-03-28
------------------------
- [fixed] crash if more than one custom color effect is added without an associated hot key
- [added] (re)added the ShowAeroWarning configuration option from the version 1.*
- [added] check box next to the current color effect in the right click menu
Version 2.2, 2013-02-17
------------------------
- [fixed] avoid crash if a hot key cannot be registered
- [added] new ActiveOnStartup configuration option
Version 2.1, 2012-12-22
------------------------
- [fixed] crash on Windows 8 due to inter-threads calls
(this was not a problem on Windows 7)
- [added] new MainLoopRefreshTime configuration option
Version 2.0, 2012-12-14
------------------------
Major update:
- reworked entirely
- better performances
- smooth transitions
- graphic interface (minimal)
- configuration file:
- fine grained configuration
- custom hotkeys
- custom color effects
Version 1.14, 2014-11-30
------------------------
- [fixed] force the working directory to be the one of the executable (so the .conf file is found when starting from the cli)
Version 1.13, 2013-07-04
------------------------
- [added] implemented the configuration file for the version 1.*
- [added] configuration option to disable the message warning about aero being disabled
Version 1.12, 2012-12-14
------------------------
- [fixed] crash on Windows 8
Version 1.11, 2012-06-26
------------------------
- [added] new red and negative red filters bound on F9 and F10
Version 1.10, 2012-05-15
------------------------
- [fixed] infinite flickering on Vista (introduced in 1.8)
Version 1.9, 2012-04-16
------------------------
- [fixed] stupid bug if the Windows taskbar is vertical
Version 1.8, 2012-03-22
------------------------
- [fixed] execution is no longer prevented if aero is disabled (previous bug corrected)
however, the performances will still be horrible
Version 1.7, 2012-03-21
------------------------
- [fixed] works as expected when using custom DPI settings
Version 1.6, 2012-02-27
------------------------
- [fixed] crash on X86 on launch
- [fixed] prevent execution if aero is disabled
(prevent undesirable behaviours: black screens, 100% CPU usage...)
Version 1.5, 2012-02-16
------------------------
- [fixed] (internal) ColorMatrix implementation
- [added] new feature: choice between 9 inversion modes
(smart mode, etc... see readme for details)
Version 1.4, 2012-02-09
------------------------
- [fixed] does not crash anymore on Windows Vista
Version 1.3, 2012-02-01
------------------------
- [fixed] multi-screen should finally work!
after a lot of tests and coding, I re-thought completely the architecture
- [knownbug] in some screen configurations, if the primary screen if smaller than the other screen,
the second larger screen has a black border at its bottom.
It could be a bug in the Windows API...
Version 1.2, 2011-09-18
------------------------
- [fixed] multi-screen support (again) : bug with main screen on the right
Version 1.1, 2011-09-13
------------------------
- [fixed] multi-screen support
- [fixed] when halted while paused, the application never stopped
Version 1.0, 2011-09-06
------------------------
- Initial release

Well, I wanted too, so I created Movie Barcode Generator.
And I’m now releasing it to everyone. Enjoy!

Usage

You give it a movie (avi/wmv), you obtain a nice barcode.

Movie Barcode Generator GUI

You can tweak some parameters, to obtain different outputs:
– Width and Height of the barcode, in pixels.
– Iterations: Basically the number of “slices” in the barcode.
– Bar width: the width of each slice in pixels.

If you leave the auto correct checkbox checked, iterations and bar width values will be auto adjusted whenever you modify the other, to fit in the desired image width.

Advanced usage/batch mode

You can also start this program in command line mode. To do so, simply add arguments to the program.
This mode allows you to generate one or many barcodes in one time.

Command Line Interface

Be advised: this mode has not been extensively tested. Use with care and please report any problem.

Examples

Feel free to experiment! Here are some examples of different outputs, using the same movie (Jumper) but with different parameters:

Technical details

Since the first release, the source code has been heavily modified and optimized.
Among other things, it now intensively makes use of threading, to achieve barcode generation at the highest speed possible.
If you are interested in algorithms and explanation, you can read my first post on this topic (in French).
Or you can simply take a look at the source code …