Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

Code search woes

Published 11/27/2013 by createdbyx in News
Tags:

As a programmer I am getting a bit frustrated when it comes to repeating my self. 

I have started a few hundred .net projects over the last 10+ years and too often I find myself needing to write a piece of code that I am sure I've written before. As soon as I get a sense of dejavu I stop and think OK where and in what project could that piece of code be located. 

Performing windows explorer searches are useless in this case as you never know what the method name was or if it was a piece of code within a method. Simple text based file contents searches are just not up to the task. And they are painfully slow and can return hundreds of files.

There are similar solutions like Krugle, or Ack etc but many of these are on-line search tools. 

What I am looking for is something for windows that can run on my local machine and parse/understand C# .cs and VB.net .vb code files. 

A visual studio extension would be ideal, but the ones I've found only search the open solution not a entire folder hierarchy containing multiple projects etc.

For example I have written a piece of code that you give a directory path and it will return a list of files from that directory structure even files that are in sub folders. But here is what I know...

  1. It uses GetDirectory or GetFiles but does not use GetDirectories
  2. It's a method that takes at least 1 string parameter
  3. It returns a List<> string[] or some type that implements a IEnumerable interface
  4. It's less then 100 lines of code give or take
  5. It may or may not recursively call it self

Given these points of data search every folder and sub folder for methods within code files that contain the closest match.

If I can't find a utility to do this I'm going to say screw it and write my own. Even though I don't really want to have to.


These last few days have been testing my patience. Three of my devices Razer Naga Epic, Steel Series 7H & Microsoft Surface Pro 2 all failed within the last few days. I’ve always meant to write a review on these devices after having used them for a long while so I am writing the reviews now while I’m still angry!

Razor Naga Epic

Just before writing this post my naga epic mouse just bricked it self on me again. Seems if you are running the mouse wirelessly and the battery dies it will brick itself and become totally unresponsive. The support website says to leave it plugged in for 30 minutes to let the battery charge up a bit and it unplug it then plug it back in and it should just work. With the 5+ times that the battery has died on me this has never ever worked. The only way to get it back to working condition was for me to flash the firmware yet again! Immediately after the firmware finished flashing poof everything works again!

Essentially this mouse is fucking useless as a wireless mouse especially when you are like me and always forget to dock it or plug it back in BEFORE the battery dies. Not to mention the fact that the battery does not hold a charge worth a dam and it never has compared to the three Logitech mice I have owned over the years. I have owned this mouse for only about two years and after the first few weeks of accidentally letting the battery die multiple times I swore up and down I would never use it in wireless mode ever again.

And like a fucking idiot who clearly has not learned his lesson, two days ago I started using it in wireless mode again. Guess what? Battery died while using it and It bricked itself AGAIN!

$100+ dollar “gaming” mouse that bricks itself. Fucking. Awesome. It must have been a value added feature I over looked when purchasing. The Razer Synapse software you use for setting up the buttons doesn't sync worth a dam between multiple computers, and takes up way too much memory for what it does. I guess that is what $100 gets you now a days.

Steel Series 7H Headphones

What looked to be a good set of headphones after reading reviews turned out to be typical plastic bullshit. It only took a month for the glue holding the padding on the top connector bar to start to separating. It never separated more then an inch on one side and was not a real issue but still. They could not chip in for a stronger adhesive?

Within the first three months I had to replace the Mini-usb/audio jack cable due to a line break at the usb end connector. I had to position the wire with a bend in it just to get it working. So I ordered 2 replacement cables “Just in case” it broke again. Over the last year I have been having issues with the contact points where the headphones unclip and disassemble for easier transport. I was having to twist the headphones back and fourth a bit while on my head to get the sound to work.

Then just two days ago the right ear stopped working and the only way to get it working albeit for a fraction of a second is to rotate the right ear muff 90 degrees from the head strap part. Because of this it seamed to me that there was a wire getting pinched so I took the right ear piece apart and repositioned the wire a bit offset to give it more slack but with no success.

I wear the headphones fully extended to fit comfortable around my head and white looking at the top piece with the padding strip on it it appears as though at both ends where the contacts are the plastic is cracked. I guess I must have a huge bobble head.

Again $100+ dollar headphones dead after two years of infrequent use. I prefer using my 5.1 desktop surround sound so I hardly ever used them unless I was traveling or away from home. I bought them because I thought to myself hey they have good reviews and they come apart for easy transportation. Only two years with light use and there basically toast. Waste of fucking money. Went online to look for decent replacement headphones. Prices $80+ Fuck me the prices are ridiculous.

Microsoft Surface Pro 2

So earlier this morning I was mid sentence writing a line of code and poof the screen goes black and the lights were off on the usb mouse and keyboard I had plugged in. I was like “what the hell”? Did the system go into a sleep mode? That can’t be right I was actively coding. I tapped the windows logo at the bottom of the surface screen and it would give vibration feedback indicating that the button was tapped but nothing would happen. I tried Ctrl+Alt+Delete nothing. Windows Key+ L again nothing. The white light on the end of the power cable was on and it was giving vibration feedback when the windows logo was pressed but other then that it was a totally unresponsive black screen.

“What the hell is going on here” I thought. I tapped the power button and still nothing. Then it hit me. What if it tanked and died permanently? For fuck sakes if it did It would mean I have no access to the hard drive because the fucking thing is glued together so there goes any chance of me getting my data off the system. Even if I could get to the hard drive there is no indication that it is a standard laptop ssd that I could just pop into another computer. It could very well be soldiered on to the motherboard. This is why I had a strong hesitation against buying a ultra portable computer. You can’t take it apart easily.

I started looking around on the internet and found a few articles with people having similar black screen issues. I held the power button down for 10 seconds, then held the volume up rocker and the power button for 10 seconds. Finally I managed to get it to reboot.

“What a fucking week, what next!”

I was keeping all my data on a 32gb SD card but then I deleted a code file and a few minutes later wanted to undelete it. Turns out there is no recycle bin for SD cards. Oh fuck no. So I moved my data over to the ssd as it was a bit faster working with files anyway and was going to setup a automated backup from the ssd over to the SD card using SyncBack free.

Then this morning the black screen of paranoia hit me and I realized that only some of my data is backed up to the cloud (SkyDrive). The rest was stored on the ssd, so had the system had a actual meltdown I would have been fucked and lost virtually all my data.

So my thinking was to keep all of my data on the SD card but with no recycle bin this become an serious issue. Storing files on the ssd without a backup solution is equally foolish as you can’t even get access to the physical ssd without destroying the machine. Putting files on the ssd and file backup to the SD card was my only option.

Microsoft SkyDrive

*takes a deep breath. Lets out long drawn out sigh*

How in the fuck can a company like Microsoft fuck up SkyDrive so badly. Ever since I have tried to use it back when Windows 8 first came out SkyDrive has displayed wonky messages, frequently takes up 30% of my CPU cycles and simply has not worked as expected compared to any and all other cloud based storage apps/services.

So one of the things I have foolishly tried to use again this week is SkyDrive to keep a cloud backup of my data. With the Surface Pro 2 I have 25gb plus another 200gb of free storage for two years. Shortly after Windows 8 launched I tried to move a few hundred thousand files from my coding projects over to SkyDrive so I could have them synced across all three of my machines. It took three fucking months to sync 8+ gigs of files. Three fucking months! On a 20mbit internet connection no less.

Since then I had stopped using it, but this week I gave it another try and moved my data from the SD card to the ssd (SkyDrive folder) and again this time I copied just over eight thousand files (about 300Mb) and two days later? Maybe a dozen or two code files had been backed up to the cloud. These are not big files they are code files! They are it’sy bitsy teeny weeny and SkyDrive seems to choke on them when trying to sync.

Google drive, Drop Box start syncing files immediately and work tirelessly to sync your files as soon as possible with little cpu overhead. SkyDrive seems to sit around on it’s ass twiddling it’s thumbs completely oblivious that I just put files into it’s folder. Then it has a heart attack when it realizes that there are files in it’s folder and starts taking 30% of my cpu cycles and after that still fucking seems to do nothing or next to nothing.

I have 225gb of SkyDrive storage and will not be using any of it. I do not ever want to have to think of using SkyDrive as a cloud backup service. 225gb of free online storage and you can’t even get people to use it. That’s how fucking craptacular your service is Microsoft. Zero customer trust. And to think a year ago for a brief moment I actually considered to pay for more SkyDrive space at one point. F that.


Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume