Monday, September 28, 2020

Visual Studio 2010 upgrade to 2017 - finally!

Latest update. I am gradually migrating from VS2010 to VS2017 for Web projects. So far, the 2017 is good for the task. It's still somewhat annoying when working with C# code with different keystrokes, popups and color highlighting, but it's way better with Javascript code parsing. It saves me tons of time when debugging JavaScript. While VS 2010 is still the tool I utilize for Windows Forms projects and other lightweight applications, for Web the 2017 is looking like the tool I can finally migrate to. And I'm doing just that.

Friday, February 28, 2020

AWS Monitor Portal and Agent and other accomplishments.

As my grandfather used to say: no one will honor you if you don’t honor yourself.

So.. a few words about my recent accomplishments in the world of software development.

Many people know about Elastic Cloud Gate for AWS, some may use it, but seeing it is an unforgettable experience. A ‘nice’ ASP interface from the 90’s, small fonts, lots of clicking. Their software does have a lot of functionality, most of which however duplicates AWS Console. Their killer feature however is facilitating scheduled AMI backups and other standard AWS tasks such as reboots. The outdated used interface of the eCG remains their huge issue - if you ever used the eCG you would prefer to set it to the auto mode and never see again (here and here).

Meet the guy who single-handedly designed and developed a product to fully replace the eCloudGate for the company he works for, and for many customers of ours. This has not only saved our company $2,500+/mo, but also lots of support time and countless frustration moments. Not mentioning that we can now pocket some profits by offering the service to our customers.

I won’t go into many details here what my software can do especially if you are already familiar with the eCloudGate website. What is notable is that my product besides doing scheduled EC2 AMI and DR backups also helps people manage AWS WorkSpaces. Last time I checked the eCG did not do anything for WorkSpaces besides reboots.

AWS WorkSpaces are virtual Windows Desktop machines offered by Amazon AWS for individual and business needs. Users can run any software they want on them much as on their own Desktops, but without fear of ever losing data due to virus or encryption attacks. Superior recovery is not the only strong side of the WorkSpaces, their speedy performance and easy maintainability make them grow in demand in the corporate world.

In short, the company I work for helps customers migrate their networks to AWS VPCs and Desktops to WorkSpaces. Besides that, our company itself owns hundreds if not thousands of EC2 instances under many departmental AWS accounts. Thanks to me and my software we now have a centralized portal to support and manage thousands of machines… and even make some money on that.

A few ‘killer’ features of my AWS Monitor Tool:

- simple and responsive user interface (here and here),
- separate administrative, customer-level , and user-level accounts,
- remote control and scripting of WorkSpaces and EC2 instances (here),
- WorkSpace and EC2 instance support and management:  real-time ‘heartbeat’ and inventory, scheduled backups and other tasks,
- and a popular feature: users can reboot their own WorkSpaces via a Text Message (SMS) (here).

Some stats as of today: my AWS monitor database is gaining 2-3 million records daily into its SQL databases.

Drop me a note if you want to find out more..

outdated eCG interface
outdated eCG interface

Saturday, January 18, 2020

Happy New 2020 Year dear Visual Studio 2010!

Seven years seems to be a long break between posts, but I must admit during that time there were no dramatic changes in my job description, while of course there was some progress.

We all evolve in our work as in no way we wouldn't if we wanted to keep our jobs. We learn new skills and tools as the industry moves forward. But some things like an old boombox from the 80's just keep working. So why not to use it?

Today I'm here to say Hi to a venerable tool that many of us still use even though it's not as popular anymore. To my opinion it's one of the best ever created by Microsoft and it remains one to this day.

Ladies and Gentlemen - I welcome the Visual Studio 2010 to the podium!

It's quick to open.

Have you used the VS 2017 or 2019 lately? Did you notice that it takes anywhere from 30 seconds to 2 minutes just to open the environment on a fast Intel i5 computer with SSD and 8GB RAM? Guess what, the SQL 2019 Management Studio takes even longer on a super-fast Xeon server with even more memory! The dev tools that Microsoft gave birth in the recent years are bloated pieces of junk umm.. software.
Visual Studio 2010 opens in under 10 seconds.

It's simple.

Do you have to juggle between 4 or even 5 different languages in your VS 2017 just to add a few things to a web page? HTML, C#, JavaScript, TypeScript, and Angular? Don't you want a hint of Linq on top of that? Do you also have to do SQL in the same project? What? Are you not happy with that?
It kinda feels like doing a translation job for the United Nations - you have to bounce between English and Spanish, then Afrikaans' flavour of Dutch, then quickly jump to Chinese, then back to English. Gosh.. that's heavy.
Guess what, if you apply for a job and honestly state in your resume that you are fluent in German, they won't even interview you as they want the Southern Austro-Bavarian dialect of German for some reason. WTF?

It compiles code into very compact footprint.

Let me give you just a couple of examples.

1.5 years ago I completely redesigned one of my software projects, which happens to be also #1 in Google for its keyword. It has millions of users and 50-60GB of daily uploads.
That project has it all: C# with .NET 4.x, AngularJS, HTML, Android API, clean and fast SQL queries - all the cool stuff.

Guess what.. the DLL that does all of that is only 100Kb. It could fit on a 360Kb floppy!

Btw, what you see on the picture is the entire contents of the BIN directory. The project runs and stores files in S3 buckets, hence the 3 extra AWS DLLs to support that. That's all.

The other project I've done in the last couple of years and which I maintain on a daily basis incorporates quite a bit more functionality.
Well.. it has to, otherwise it wouldn't have over 120 thousand lines of code!

It does a lot of modern stuff including API access via JSON/REST protocols and it does a lot and I mean a lot of database talk. The average daily traffic is reflected in over 2 million daily SQL INSERT calls via just one server with occasional spikes in traffic. I didn't count how many SELECT queries it does, but I'm sure a lot.

That project is designed to do AWS infrastructure management that AWS console happens to do well, but there are some functions that the console does not do too well, specifically the WorkSpaces management and more. If you ever used AWS Console you know what I mean. But.. anyway.

The DLL that runs the whole thing - API and all - is 444Kb. Nice!

The only 3rd party DLLs in the BIN directory are AWS runtimes. No freakin 'scaffolding' or auto-generated junkware code.
For a comparison, a simple web-based "hello world" in VS 2017 eats up 15 to 60 Megabytes (!) of space for its BIN folder.

Do you have any questions or opinions? Do you want to discuss that? Post a comment.

Saturday, December 21, 2013

The simplest way to speed up your laptop

I have been going through several interesting projects lately. There were a couple of important ones which required processing large and somewhat twisted SQL databases. The other, "weekend" projects, made me dust off Eclipse and fix some cool Android code to make it work on KitKat. But this article is not about large files or databases. It's about those small but pesky JPEG files we often overlook and underestimate, but which seriously affect performance of our aging laptops.

So here is the story.

About a couple of months ago I went to our local toy Tigerdirect and bought the latest 1TB Seagate hybrid drive for my laptop. I expected it to be better than its predecessor, the Seagate Momentus XT which I used for a couple of years, but which started to show its signs of wear.

I was very happy with the new drive. For about a day or two. Then I noticed that the laptop boots up slower than before the upgrade. But the worst hit was to see web sites load noticeably slower. You know, those that unroll their galleries of high quality photos when you scroll down your mouse wheel. One of my favourite ones is the Autoblog, but it looks like all of them are now going that way in web design.

Well, you may say that the new drive is only 5400rpm while the former one is 7200, but that's not the show stopper for me.

I started thinking and decided to look at how the antivirus software works on my machine. Of course, I have MDF and LDF files excluded from active scan, for obvious reasons. What else? So I gave it a thought and decided to turn off scanning of JPEG, JPG and PNG files. Why? Because they are pictures. I don't care if they have any code in them. I don't rename them to exe and launch just to test. That would be quite foolish.

Well, now my web browser runs faster and smoother. No more stuttering on large web sites like Autoblog and others. And I can live with this new larger but slower drive until Seagate makes the faster version.

Friday, December 6, 2013

How to switch PgUp/PgDn keys with Home/End without breaking keyboard

After adding a bluetooth adapter to my Toshiba laptop, I am fully enjoying the world of bluetooth accessories. In fact, I am getting spoiled by not using the USB ports for a keyboard or mouse. Wireless peripherals and especially bluetooth ones are so much cooler than pulling wires..

Finding a decent bluetooth keyboard was a bit of a hassle for me though. I have relatively big hands, and I am used to those curvy Microsoft keyboards such as Microsoft 2000. But the 2000 model is wired, which defies the whole purpose. It's also quite big. I like my desk tidy. And I don't use the calculator side of the keyboard at all.

The only one bluetooth keyboard I really liked is Microsoft 5000. Positioned as a keyboard for mobile devices, it's lightweight but solidly made, stylish, having large keys with great feedback. It does not come with the calculator keys (you can get the 6000 model for that), but otherwise it covers my needs for 100%.

For some reason, Microsoft does not make model 5000 keyboard anymore, and it's getting increasingly hard to get one new. I recently purchased another one on eBay, it came new in a box, sealed and unopened. Now I have one at home and one at work. They are exactly the same. I do carry my laptop back and forth, and when I turn it on, it would seamlessly connect to them, without any additional clicks or switches.

But... this article is not only about this awesome keyboard. It's about how to fix some of its keys.

Perhaps one of the reasons why Microsoft stopped making the model 5000 is because it was unpopular. It was unpopular probably because it had a few of its keys defined incorrectly. The PgUp and PgDn functions were sharing the same keys with Home and End. While PgUp and PgDn were made default keys, to use Home or End you have to push and hold the Fn (function) key each time to use Home or End.

I work with a lot of text on a daily basis (I am a programmer), but I don't use PgUp or PgDn as often as I use Home and End. In fact, I almost never use page up or page down. I use my mouse wheel to scroll between lines and pages of code.

But.. where there is a will there is a way. This problem didn't stand long against one's programmer's skills. I googled up a few things and came up with two registry files. They can help you too make your PgUp and PgDn keys work as Home and End, or undo those changes, respectively. The best thing is that the PgUp/PgDn don't go away, they can now be used with Fn key. In other words, the PgUp trades places with Home, and PgDn with End. In computer language this method is called changing scancode mappings. Btw, it worked for me on both Windows XP and Windows 7.

If you had the same problem I had, and if you want to switch your keys on your keyboard the same way, simply copy (verbatim!) the portions of text below into Notepad, separately, and save them as two separate .REG files. Take twice a day... I mean, run the first one to swap the keys, and the second one to reset the keys back to default layout.

Use this to switch PgUp/PgDn with Home/End:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,47,e0,49,e0,49,e0,47,e0,\

This will reset keys back to default:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00

Disclaimer: the purpose of this article is to give a solution, not to force you to change anything in your computer be it hardware or software. Always wear gloves.. er.. I mean, always pay attention and utmost care when dealing with Windows registry. Back it up, etc. Improper actions or a misspelled command may result in unstable work or even unresponsive computer. I can only show you the way, you are the one to walk it, which means I don't guarantee this method to work on your particular computer, neither may I be held responsible for any problems caused by user actions.

Credits: Remapping Windows Keys by Preston Hunt

Thursday, November 14, 2013

AT&T vs T-Mobile, iPhone vs. Android, and more


It's now more than a month since I left T-Mobile for AT&T. The overall impression is good. But let me tell the whole story.

My major problem with T-Mobile was its spotty coverage. It worked ok where I live, worked ok when I drove, but it didn't work when I'm at work. People were asking me why you don't have your phone on when we call you. The problem was that the phone had to be placed next to a window when I am at work, and we are in an office area with good outside reception. The phone only worked in a certain corner of my office, when placed on a bookshelf. Even so, when I got a call, I was able to pick it up, but generally it would drop after a few seconds. After that, a new call cannot be placed until nearly 3-5 minutes after the drop, as the line would be blocked completely. Zero bars and no internet.

I first thought it was my phone. So I changed phones several times, used Samsung Galaxy, Nexus 4, iPhone 3GS, some older Samsung flip-phone. Same results. It's great to be on GSM network. I could switch phones by popping in and out the same Sim card. Later I ordered a new Sim card from T-Mobile, but with the same results.

Being a computer programmer, I have a clue how databases work. The whole behaviour of T-Mobile handling my Sim card would be as an old customer I was placed in the very bottom of the Users' table. Perhaps even in some sort of an ArchivedUsers table. I just can't explain the huge lag in the connection other than being on the bottom of the Users list, and the database index not being updated properly.

Another interesting problem with T-Mobile, which is probably only interesting to technical types, is that it was dropping my Internet connection every 2-3 days. As I was hitting a certain data allocation at a time. After a day or two of Internet use with my Nexus 4, most of which was e-mail and occasional use of Google Maps, the phone would stop obtaining the IP address completely. The only cure was to shut down and reboot. (Think Android issues? nah! read through..)

But despite the lags and poor connection, I was willing to stay with T-Mobile until the end of days. Mostly because they are inexpensive, and my contract was long gone. Nothing beats T-Mobile prices with the service they have. They are good.

The last drop happened when my daughter started attending college. Needless to say, we asked her if she wanted a new phone. She said no, as she wanted to save money. I respect that. The problem however showed up where it was less expected. Guess what, the T-Mobile reception in her area was next to nothing. So.. we started shopping for a new phone, a new calling plan, and ended up with AT&T.

As part of the new plan with AT&T, they sent us two brand new iPhone 5s's. I've never owned an iPhone before. (A used 3GS for testing our app don't count.) We've always been Android people, sort of a geeky type.

After two weeks of everyday use of iPhone 5s, I ordered myself a nano-to-micro sim card adapter. I could barely wait until it arrived so I could go back to my Nexus 4. You may ask why.

Is the iPhone bad? Oh, not at all. Very light, slick looking device, all nicely machined from an aluminum cast. Fast? yes. Reception? good.
So, what was the problem?

The short answer would be that the Nexus 4 is better. It's a bit wider, yes, but the wider screen is so much better, I won't even compare them. The 150 pixels make so much difference. That's not all though. Most of the advantages come from Android niceties. The totally awesome Back button, Multitasking, and clever use of the Multicolor LED indicator. Here is an example.

With iPhone, if an email arrives when you are not around, or you didn't hear the beep, you won't know until you pick the phone up and look at the screen. With Nexus, the LED indicator on the front panel, the same place where iPhone has its main button, starts slowly blinking with one of the 4 colors. I assigned various colors to different email accounts, and could instantly spot an important message.
Another cool thing is having a Google Talk or any other background app run and notify you when someone is calling you, without having it on the front page all the time. It may drain the battery a bit more, but Nexus never gave me any battery problems. It's fairly good with battery even after a year. I rarely had less than 1.5 days on one battery charge with my normal use (4-6 hours of book reading, dozens of emails and a few calls a day). I don't watch movies and I don't play war games on the phone.

Now, back to the AT&T service. The reception is great so far. I mean, it's just awesome. It works everywhere. I'm back to my Nexus with the AT&T SIM card in it, and I finally feel like I am actually using a real phone, and not a dumb pager with diode-like reception. So far, no IP address drops after 3 days, not even after a week of use. (Hey network engineers, any thoughts?)

By the way, a nano-sim card adapter made my transition from iPhone 5s to Nexus completely easy. I rebooted my new Android phone, and it picked up the AT&T network right away, including HSPA internet service. I'm a happy camper so far.

Saturday, October 26, 2013

Why you shouldn't buy VW assembled in Mexico

Below is the photo of the tube going from the engine head to the brake cylinder. The pipe cracked in 3 places, due to bad quality of the plastic material. And no, it's not rubber.

This pipe creates vacuum in the brake cylinder to make car brakes work. If the pipe breaks, the vacuum will not be sufficient enough to stop the car.

Luckily, I caught this before leaving the garage, and replaced it with the $1.50 tube from our local Autozone. 10 minute of work saved lives..

While I may buy a VW in the future, I will never buy a VW from Mexico.