All right, not so much of a techie article, more of a choice / philosophy article. Here goes.
Back in the late 90ies, when this thing called the interwebs was just getting going, there were all sorts of smaller software packages you could buy to do little things. Ulead GIF animator, 3DFX suite, Bryce 3D, gosh I forget most of them at this point which makes me sad. I didn't have a lot of money back then (still don't but relatively I'm more able to purchase things). I loved saving my pennies and buying these little 50 dollar software packages that would allow you to do photo editing and basic 3D stuff.
But the big stuff, like Photoshop, was always out of reach to me. So I went on this thing called usenet (ancient I know) and there was a adobe.support.whatever group. I didn't have much money, but I worked at a winery at the time, and I could get wine dirt cheap, so I figured maybe I could reach out to Adobe and make a deal. And it worked. Pretty soon I exchanged emails with someone at Adobe and traded a box of various wines for a brand new version of Photoshop 4.
Now I was professional. I loved that program and played with it a lot. But over the years I went more of the programming route, and had less and less time to play with Photoshop. Somewhere around version CC whatever the interface changed quite a bit. I find sometimes with the new interface doing simple stuff takes me a bit to figure out. If I still used Photoshop often it would be no big deal, but the truth is I just don't anymore. And what I do use it for is often really simple, stuff free software could like Paint.Net could do really easily.
So it leaves me with a conundrum. I've been fiercely loyal to Adobe ever since I traded with that one guy online for a case of wine for Photoshop. I love Adobe products. I pay for the full creative cloud (about 55 to 60 bucks a month) which gives me everything. After Effects, Premier, the works. And for all you get that price point in my humble opinion is an absolute bargain...if you use the tools a lot.
And there is the rub. I don't. I want to. I keep setting little goals for myself to learn After Effects or Indesign. If I don't I will give up the subscription. The goals come and go but yet over 600 bucks a year goes out of my wallet to Adobe.
Two issues. Expense and learning curve. GIMP, Paint.Net, Paintshop Pro, etc... are all fairly capable programs for what I would ever use them for. These low end "consumer grade" or freeware stuff has come a long, long way from where they were ten years ago. Paintshop Pro is fairly compatible with Photoshop, I think it can even export PSD's and such. Premier is awesome, but I haven't really used it since like CS1, and when I try to use it now I can figure stuff out, but it takes awhile.
There is a sale going on right now where I can get Corel's Paintshop Pro and whatever the Video Editor is called for like 80 bucks. I've used Vegas (competing video editor to Premier and another tempting but more expensive option) before and I like it, but that Corel bundle is tempting. About a month and a half of what I pay for Adobe's stuff. Hell I could even buy the latest versions every year and still come out way ahead.
I think I'm going to give up my subscription, and because of my history with Adobe it sucks. I hesitate a bit because in a sense it is admitting defeat for me. By giving up on the professional grade Adobe tools I am admitting to myself that I most likely will never become a professional graphic designer. When I initially got into web development, twenty years ago, the graphic side of things is what I liked. But I realized quickly that my talent there was limited, and focused more on coding. That little bit of that young man getting into tech still lives and still really wants to be a "real" graphic designer, but...the reality of things is I just won't get, or make, the time to do it, nor encounter projects both at work and at home that really push me on the graphic design level. I sadly am coming to grips with this, and thus I'm more willing to give up my Adobe subscription for the "consumer" grade stuff. It bums me out.
But at the same time, using newer, less clunky software might actually be a key to jump starting my graphic design skills again. With limited time, using easy to (re)learn stuff to get content out the door quickly when I do have time to play with things just might be the spark I need. Instead of using a giant hammer to tackle a simple task, which makes the task less fun, maybe using a simple, quick, light tool to do it will get me past those simple task into more complex ones, where I actually do hit a wall and need more advanced tools to get a job done. And if I can convince my wife to let me keep that 600 dollar yearly budget, but spend it on other things, I can purchase some 3D software I've been eyeing again.
Lastly, Adobe has changed a bit from when I first had a relationship with them. It seems Adobe, even though their tools are still absolutely the best, is a different company now then when the were in the 90ies. As a company they have blown a few opportunities as well. Director could be eating Unity's lunch, but Adobe let the ball fall there. Not sure Flash was handled like it could have been as well, heck I would have rather have seen Director pushed more than Flash. And then when Adobe did redo Directory they just outsourced to a team of programmers and did a refresh. Not sure how much in house talent they keep around in house. I'm sure some, but they are doing the global outsourcing thing like everyone else. No longer the slightly bigger Mom and Pop company that I encountered long ago. Maybe my out for a little disloyalty :)
Well, if I ever am able to get into the swing of things, I can resubscribe I guess. Just worry I never will as time and tide take me down other paths with software. But the option is there.
Adobe, I love you. Your software is still king. But I must acknowledge that a full on graphic designer I am not, and I can make do with a lot less. Makes me sad. It is me not you.
A Southwestern adventurer striking out into the badlands of the Midwest for fun, profit, and for a wife who wouldn't move back to the Southwest :)
Friday, December 01, 2017
Friday, November 10, 2017
Waaa
A former boss of mine, a great guy, made a comment about some code I wrote a long time ago and how the follow on developer said it was crap. Oh I betcha it probably was...some of the stuff I still right today is crap. I just wrote some crap a minute ago.
Crap code sometimes is a value add. Craftsmen like to do everything perfectly. But sometimes when someone needs a hammer you don't need to always build Thor's Hammer for them. Sometimes if someone brings in something broken fixing it with duct tape works fine. Not always, but sometimes. I know even thinking this way is heresy in the current world of code blogging. But writing code is only a single domain. Problems often are multi domain problems, where time, effort, and other priorities play a roll. Sometimes you just have to do what you can and move on though I agree that this shouldn't be done just for laziness sake (though I'm guilty of this a time or two). People following after you may not know the variables at play. All they see is a crappy hammer and some duct tape.
A prime example of this. I'm working on a big project, but I get pulled off to do a minor upgrade on an older project. I look at it. To do this upgrade the proper way would have required re-writing code that affected a whole lot more than just the minor update I needed to accomplish. Plus, I'm having a feeling that this project within a few years will be rewritten from the bottom up. So, I decide to just "hack" it for now so I can get back to other priorities, so I don't have to rework something that goes deep into the code base that could have unintended consequences, and I won't have to spend time to do more testing than either the project manager who pulled me off another bigger priority or myself originally thought. The "hack" took about a half an hour and 15 minutes of testing. Done. Moving on. In a few years I might come back and look at what I did and say "what the frack?" But EVEN if I did do the deep fix, I guarantee when I rewrite the application (or whoever else does) this code section will be completely rewritten from the bottom up as requirements over time have changed and will change. So it would have been pure vanity as a craftsman to "do it right" this time around. I left a few notes and called it good.
And I've inherited lot's of code over the years that I would have written differently if I wrote it. I would have written it "better" or at least more understandable. But I don't remember ever calling code that worked crap. But then that is how I judge things...does it work? Do the users like it? Is it responsive? Are there at least a few things I'm wowed a little by? If yes then I call what I wrote or anyone else wrote a success.
In the instance I was critiqued on, I know my code worked, just some anal type didn't like how I wrote it. I also know that an auditor for the fortune 500 company I wrote it for called it one of the most intuitive tools he ever used. And he didn't say this to flatter me as I was already gone from the company, he said this after. So suck it anal type!
Now the kicker. As a developer I'd say I'm mediocre. I've met many developers who can program rings around me. I've also met many who cannot (some may know this, many may not, but proof is in the pudding). I'm not the best craftsman nor, to be totally honest, do I want to be. The problems I'm solving are often more interesting to me then the tools being used to solve them I guess. But I get the job done. The average burn out rate for a developer is five years...I know many great developers who have lasted longer than that, but that is the average.
So I wonder, I'm still here. I've been writing code, some good, some bad, most mediocre, a small percentage brilliant, for almost 20 years now. Many craftsmen would hate me. I betcha I'm sill here after they have burned themselves out and are gone...
I guess that comment just stung more than it should have. And I also have to keep in mind that much of my success has been due to grace...unmerited favor by the creator Jesus. I've gotten opportunities that I didn't merit and advanced in my career beyond what others more talented then myself have been able to. I don't want to get a big head.
But to distractors, although it might aggravate you, I'm still here...while most of you are gone gone gone!
Crap code sometimes is a value add. Craftsmen like to do everything perfectly. But sometimes when someone needs a hammer you don't need to always build Thor's Hammer for them. Sometimes if someone brings in something broken fixing it with duct tape works fine. Not always, but sometimes. I know even thinking this way is heresy in the current world of code blogging. But writing code is only a single domain. Problems often are multi domain problems, where time, effort, and other priorities play a roll. Sometimes you just have to do what you can and move on though I agree that this shouldn't be done just for laziness sake (though I'm guilty of this a time or two). People following after you may not know the variables at play. All they see is a crappy hammer and some duct tape.
A prime example of this. I'm working on a big project, but I get pulled off to do a minor upgrade on an older project. I look at it. To do this upgrade the proper way would have required re-writing code that affected a whole lot more than just the minor update I needed to accomplish. Plus, I'm having a feeling that this project within a few years will be rewritten from the bottom up. So, I decide to just "hack" it for now so I can get back to other priorities, so I don't have to rework something that goes deep into the code base that could have unintended consequences, and I won't have to spend time to do more testing than either the project manager who pulled me off another bigger priority or myself originally thought. The "hack" took about a half an hour and 15 minutes of testing. Done. Moving on. In a few years I might come back and look at what I did and say "what the frack?" But EVEN if I did do the deep fix, I guarantee when I rewrite the application (or whoever else does) this code section will be completely rewritten from the bottom up as requirements over time have changed and will change. So it would have been pure vanity as a craftsman to "do it right" this time around. I left a few notes and called it good.
And I've inherited lot's of code over the years that I would have written differently if I wrote it. I would have written it "better" or at least more understandable. But I don't remember ever calling code that worked crap. But then that is how I judge things...does it work? Do the users like it? Is it responsive? Are there at least a few things I'm wowed a little by? If yes then I call what I wrote or anyone else wrote a success.
In the instance I was critiqued on, I know my code worked, just some anal type didn't like how I wrote it. I also know that an auditor for the fortune 500 company I wrote it for called it one of the most intuitive tools he ever used. And he didn't say this to flatter me as I was already gone from the company, he said this after. So suck it anal type!
Now the kicker. As a developer I'd say I'm mediocre. I've met many developers who can program rings around me. I've also met many who cannot (some may know this, many may not, but proof is in the pudding). I'm not the best craftsman nor, to be totally honest, do I want to be. The problems I'm solving are often more interesting to me then the tools being used to solve them I guess. But I get the job done. The average burn out rate for a developer is five years...I know many great developers who have lasted longer than that, but that is the average.
So I wonder, I'm still here. I've been writing code, some good, some bad, most mediocre, a small percentage brilliant, for almost 20 years now. Many craftsmen would hate me. I betcha I'm sill here after they have burned themselves out and are gone...
I guess that comment just stung more than it should have. And I also have to keep in mind that much of my success has been due to grace...unmerited favor by the creator Jesus. I've gotten opportunities that I didn't merit and advanced in my career beyond what others more talented then myself have been able to. I don't want to get a big head.
But to distractors, although it might aggravate you, I'm still here...while most of you are gone gone gone!
Tuesday, May 16, 2017
Microsoft is Losing Me
Firstly, Microsoft has been good to me. My semi-mastery of Microsoft tools for web development has spawned nearly a 20 year career. So I am by far not a Microsoft hater. Yet some recent things that Microsoft is doing has me scratching my head.
- ASP.Net Core - The idea of having one framework that will run nearly anywhere is a noble one. But is this really a problem that your average enterprise development team was asking to be solved? Most (I'm guessing) that use Microsoft Visual Studio for development are solidly in the Microsoft ecosystem. The idea of running MVC on non-Microsoft servers appeals to what...one percent of the Microsoft ecosystem users? Plus if I can use free tools to develop open source MVC say, why would I be paying 1000's per year per developer seat for Visual Studio? So I can tweak JSON config files and run things from the command line out of penis envy for Linux users? Dude I like GUI's. Seems I'm one of the few. Maybe that makes me a weak programmer but I grow tired of coda obscura for config files and other command line crap. Give me a limited set of options in a GUI window that is well documented so I can pick what I need and move on to solving problems not pulling my hair out with being gifted with additional ones from Microsoft.
- Along similar lines, what is up with XAML? I knew Silverlight would fail just like few are picking up XAML. Again, why the GUI hatred all of a sudden? Weird.
- Constantly changing things. We have been jumping through hoops from Microsoft for years. First ASP. Then ASP.Net Webforms. Then MVC. Now MVC core with helper tags quasi bringing back webform like functionality (but without the GUI support...sigh). As we jump through the hoops we leave a scattering of legacy applications behind us. The bleeding edge buzz word flinging developers build and move on leaving their head aches to others while they pursue fame and glory. Us rank and file dudes have all these apps to support. It is starting to get old. If you wrote a PHP app 20 years ago it would (with minimal tweaking) work fine now. LAMP stack is still widely used. Can we say that for Classic ASP aps? Not really, though some decent sites are still powered by it. What about .net 1 apps? 1.1, 2.0? MVC 1? .ASMX web services? Now core? What happens when Microsoft jukes in a new direction? Should we constantly be upgrading our apps to feed the beast?
I really like MVC and Sqlite. For me it is a sweet spot for development. But I think I'm going to become a real programmer and start branching out to Ubuntu running Node.js. I bet I can build and app and not touch it for 10 years and it will run fine on the latest version of Node and Ubuntu just fine (though would be ugly as HTML / JS / CSS evolves, but it would still work!).
Microsoft, you are losing me.
Tuesday, March 28, 2017
xmldatasource
For those of us still stuck supporting and enhancing web forms apps, sometimes it is useful to use an xmldatasource to as fake data until the underlying structure can be worked out. Pasting a sample of an xmldatasource here to remind me of it's format in the future. This is what you need for combo boxes
To databind xmlsources to grids, you want the data to be laid out more like this
<asp:XmlDataSource ID="MyDataSet" runat="server" XPath="/items/item"> <Data> <items> <item desc="field_one" val="some value" /> <item desc="field_two" val="escape invalid chars" /> <item desc="field_three" val="vals can by any type just put them line like a string" /> <item desc="field_four" val="And so on, and so on, and so on" /> </items> </Data> </asp:XmlDataSource>
To databind xmlsources to grids, you want the data to be laid out more like this
<asp:XmlDataSource ID="MyDataSet" runat="server" XPath="/items/item"> <Data> <items> <item field_one="some value" field_two="escape invalid chars" field_three="vals can by any type just put them lin like a string" field_four="And so on, and so on, and so on" /> <item field_one="some other value" field_two="escape invalid chars" field_three="vals can by any type just put them lin like a string" field_four="And so on, and so on, and so on" /> </items> </Data> </asp:XmlDataSource>
Monday, February 27, 2017
Using the tinyMCE CDN
As you know there are all sorts of text editors out there. For my purposes tinyMCE works fine. It has a CDN so with the inclusion of a little javascript, you have a capable wysiwyg text editor without having to install any bits into your code (as long as the CDN is up...). Here is how I use it.
This works pretty well as a blog editor. I have to hand put in some HTML for embedded images and videos, but so far that hasn't been a big issue. I get the raw HTML from the tinyMCE editor for saving like so-
var ct = tinyMCE.activeEditor.getContent({ format: 'raw' });
Quick and easy. Happy coding.
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script> <script> tinymce.init({ browser_spellcheck: true, contextmenu: false, selector: 'textarea', height: 500, theme: 'modern', plugins: [ 'advlist autolink lists link image charmap print preview hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen', 'insertdatetime media nonbreaking save table directionality', 'emoticons template paste textcolor colorpicker textpattern imagetools' ], toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', toolbar2: 'print preview media | forecolor backcolor emoticons', image_advtab: true, }); </script>
This works pretty well as a blog editor. I have to hand put in some HTML for embedded images and videos, but so far that hasn't been a big issue. I get the raw HTML from the tinyMCE editor for saving like so-
var ct = tinyMCE.activeEditor.getContent({ format: 'raw' });
Quick and easy. Happy coding.
Friday, January 20, 2017
An Old Programmers Tale of Caution and Encouragement.
This was originally posted [HERE]. The post is so old I worry it will vanish, and I think it is an important read, not just for gaming, but for any project. So I re-post it here. God bless rogerborg.
----------------------------
Why I can't write games anymore - a novella
Postby rogerborg » Wed Jan 16, 2008 1:07 pm
Pull up a chair and I'll tell ye a tale. A tale of back in the olden days, when men were real men, women were real women, and small fluffy compilers from Alpha Delorie were real small fluffy compilers from Alpha Delorie.
Back in the Day - about 1994 or so - I found myself with some free time on my hands. So I 'downloadorzed' (hey, it was a novel concept back then) Allegro and djgpp for my supa-phat new 486DX2-66 DOS/Win3.1 PC and decided that I'd write me a game.
Because I'm a sad Trekkie (please, nobody ever tell my daughter why she's named Miranda) I figured that I'd write a computronic version of Star Fleet Battles, easily the most complex board game ever devised by Man or Nerd God. I mean, that thing ships with Errata, Addenda, and Errata in the Addenda.
Bear in mind that at this point, I really had no idea what I was doing. Sure, I had a degree in Computer Science, but being from the Old Skoolz it hadn't taught anything as tawdry as how to actually, you know... write software. I'd hacked the bejeesus out of Netrek, but only to the extent of pwoning it with a 'borg client.
So I went in with an abundance of overconfidence, and no real knowledge of what I was doing, or how to achieve it.
And in about 8 weeks of finger-bleeding coding, I had a playable 2D game written in pure structastic C and debugged with printfs(), much as the Pilgrims must have done. It had no config to speak of: you created ship descriptions in human readable text files, using a 'unit X is based on unit Y' hierarchy, and likewise with scenarios. When you started it up, it presented a simple list of available scenarios. You selected one, and away it went.
But you know what? That primitive pile of junk implemented a significant subset of Star Fleet Battles. Cloaks, shields, damage control, phasers, photons, disruptors, plasma torps, drones, anti-drones, hellbores, fusion beams, expanding sphere generators, tractors, transporters, boarding parties, shuttles/fighters, tugs, pods, star bases, planets and ground bases, all 'modelled' in Windows 3.1 Paint then rendered in glorious spinny 2d-o-rama, replete with asplosions and Star Trek sound effects ripped from the bleeding belly of the burgeoning intartubes. It had AI that provided a moderate if predictable challenge, it had fleets and fleet commands, and it implemented all of my original requirements and a few more besides.
That was in 1994, when I knew nothing and had tools little better than sticks and rocks. In 2008, when I know vastly more about how to design, write and test software, and have tools that would make the 1994 me mess my pants... I honestly believe that I couldn't write that game again.
Want to know why not?
I know too much, and have too much.
I'd second guess myself on design, and design patterns. I'd agonise for weeks over the exact hierarchy of objects, interfaces and responsibility for implementing features, and then I'd change my mind and start over. I'd spend an age carefully abstracting away the presentation from the data so that I could change engines, then I'd spend another age using that flexibility to dither over whether to use engine X for its bells, or engine Y for its whistles. I'd agonise over whether a networked version should be architected as a multiplayer game with AIs, or a single player game with a coop/competitive mode. I'd type a line of code, then Google for an hour to convince myself that it was optimal.
I'd make posts like this rather than actually knuckling down and just writing code that implements the clear goals that I've set myself, because it's more rewarding to talk about it than to worry that I've picked the wrong way of doing it.
In 1994, I was Aquaman. Sure, all I could do was talk to fish, but dammit, when there was a problem to be solved that smelled even remotely piscine, I talked their little fishy fins off. Now I'm El Dorado. I have loads of powers, and can make up new ones as I go, but that just makes it harder to choose one and go with it. A marauding octopus! Should I read its mind? Shoot it with my eye lasers? Create an illusion of a sexy lady octopus? Should I grab it and teleport it to a sashimi restaurant? What to do... what do... oh, never mind, it's eaten Kairo.
So, as we grind and bump towards the conclusion of this senile shaggy dog story, do I have a point to make? A nugget of wisdom to impart?
I do.
First, don't listen to the 2008 Rogerborg. Now I only know what can't be done. I've forgotten what can be achieved though ignorance and determination.
Second, listen to the 2008 Rogerborg when he says to do as he says, and not as he does. If you have a game that you want to write, then write it. Just knuckle down and write it. Don't worry about how optimal your data encapsulation is, just bung everything into a structure and call functions on it. Write naive code, and don't give a stuff about optimisation or resource management. Get stuff on screen, and make it spin.
When you are happy, then you're done.
And here endeth the lesson.
Thursday, January 12, 2017
Three SQLite Gotchas
If you are using SQLite coming from say a Microsoft SQL Server background, here are a few differences that might throw you.
- There is no TOP as in "select top 50 from....".
Instead you use LIMIT, and you put it at the end of your query like "Select blah from blah order by blah limit 50". - Paging because of the above is actually made easy. You can use OFFSET with LIMIT for easy paging like so. "Select blah from blah order by and wheres blah limit 20 offset 50..." if you pass in a paging variable like say @page you can times your offset to get you what page you want, like "offset * @page". There is even a shorthand for it, but with a gotcha...the offset and limit are swapped. Like "select .... order by blah limit 40,10" actually means offset 40 limit 10, which is counter intuitive but there for backwards compatibility.
- CASE. Case is kind of a bummer for comparisons in SQLite. you can set in on your indexes or on your connection strings to ignore case on your where @mystring = 'blah' type queries like so
- programa collate nocase in your connections string
- collate nocase on the end of your queries
- or add collate nocase on your index when creating a column
But alas, not that simple. this only works for UTF-8, if you are using UTF-16 you have to use more exotic solutions with collate binary (I'll leave a link).
Out of the box you can fake insensitivity using the like operator, select blah where x like @xxx +'%'... though note here you are better off adding that % operator on your sql param then having it in your query string, for some reason the later doesn't work for me but maybe I'm missing something.
Also instr, the equivalent to charindex in SQL, insn't case insensitive. Bummer.
Some useful links-
>> Stack Overflow How To Set SQLite Case Insensitive (binary collate in link towards end)
>> Stack Overflow Limit and Offset in SQLite
>> Stack Overflow Limit and Offset in SQLite
Monday, October 10, 2016
CSS Responsive Videos
Again, these are old tricks but new to me as I get back into developing new sites rather than supporting Telerk based ones. In the previous post I shared a CSS snippet on how to make images responsive. Now onto video. A lot of sites offer ways for you to copy some code that allows you to paste their videos into your various web sites. Many use iframes to do this which can be a little problematic.
The following CSS snippet works for youtube videos at least. I just take whatever copy/paste code form a given site that allows me to embed things and wrap it in a div with the class "vid". Here is the CSS.
This seemed to work. More information [HERE].
The following CSS snippet works for youtube videos at least. I just take whatever copy/paste code form a given site that allows me to embed things and wrap it in a div with the class "vid". Here is the CSS.
.vid {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
.vid iframe, .video-container object, .video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
This seemed to work. More information [HERE].
Getting the Strong Name PublicKeyTolken from an Assembly
[Update, if this doesn't work check the bottom]
Ok, this is .net 101, but I don't update assemblies that often so here is a recap of it so I remember in the future more for me than for you.
1) First, go the the assembly, right click it, get the details, write down the version number, that is probably old too.
2) Since you have the file open, copy it's path, then open up a Visual Studio command prompt. Type in
sn -T (paste your path)\yourassemblydll
And it should output a new/correct PublicKeyTolken.
Copy and paste the new version and the new PublicKeyTolken text into your config file. That should do it.
More info on this [HERE].
---------------------------------------
Well, this used to work all fine and good, but didn't work on a new machine that I have that just had visual Studio 2015 on it. Here is what I had to do.
1) Navigate with file explorer to where the sn.exe file is located, for me it was here-
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools. Copy that that path then open the Visual Studio developer prompt.
2) type cd then past the path in, hit enter.
3) Next, get the path to your dll that you want to get a strong name for. Also write down the detail information like in step 1 in the old way above.
4) In the command prompt type sn.exe -T and hit enter.
That worked for me.
Ok, this is .net 101, but I don't update assemblies that often so here is a recap of it so I remember in the future more for me than for you.
1) First, go the the assembly, right click it, get the details, write down the version number, that is probably old too.
2) Since you have the file open, copy it's path, then open up a Visual Studio command prompt. Type in
sn -T (paste your path)\yourassemblydll
And it should output a new/correct PublicKeyTolken.
Copy and paste the new version and the new PublicKeyTolken text into your config file. That should do it.
More info on this [HERE].
---------------------------------------
Well, this used to work all fine and good, but didn't work on a new machine that I have that just had visual Studio 2015 on it. Here is what I had to do.
1) Navigate with file explorer to where the sn.exe file is located, for me it was here-
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools. Copy that that path then open the Visual Studio developer prompt.
2) type cd then past the path in, hit enter.
3) Next, get the path to your dll that you want to get a strong name for. Also write down the detail information like in step 1 in the old way above.
4) In the command prompt type sn.exe -T
That worked for me.
Thursday, October 06, 2016
CSS Responsive Images
This is an old trick but I didn't know it. Here is how to make your images auto scale-
More [HERE].
Also check out the new picture HTML 5 element [HERE].
img {
max-width:100%;
height:auto;
}
More [HERE].
Also check out the new picture HTML 5 element [HERE].
Friday, September 30, 2016
Celebrating Some Depreciated Tech
Early this year I purchased an ASUS gaming laptop for development and I love it. 16 Gigs of RAM, I popped in a mk2 SSD, and the thing smokes. But this post isn't about that. This post is about my stall worth HP Pavilion dv6-6c35dx laptop that served me well for about three years.
I loved this laptop. I probably had it up and running for 14 hours a day most of the time and it didn't give me any problems. It had some gaming capability with the built in Radeon graphics card that did fine at low and sometimes medium settings playing all but the most latest games. After about a year I put in a Samsung 840 EVO SSD and the thing really hummed. Zero noise and fast boot times. The six gigs of memory was just enough so I could comfortably develop on it, running virtual machines with 4 gigs of memory out of the six allocated to a particular VM.
I know HP laptops are hit and miss. I supported HP laptops at a huge corporate cube farm early in my career and some of the models HP put out where just horrible. I probably wouldn't have bought this one at all but dumped a cup of coffee on my Toshiba laptop and it fried. I needed a laptop for work now and at the time I liked the specs and the price of this HP so I took a risk and that little A8 Pavilion ended up being a great work horse.
Spec wise it was nothing that great, but for what I wanted to do with it it seemed perfect. Light to medium gaming, opened applications and booted up lighting fast due to the later added SSD, quiet, never over-heated. I miss it.
With Windows 10 coming out and Visual Studio 2015 on the way I had been debating getting a new laptop for a long time but this Pavilion just seemed to keep handling everything I could throw at it so I held off for awhile. One of my dogs helped me take the plunge though, as it got it's tale caught in the power cord and yanked my poor Pavilion (which I had dropped and punished numerous times before without every having any problems) onto the floor and munched the monitor or the graphics card. That was enough to in my mind justify buying a new machine.
I always felt kind of guilt though, like I had cheated. I could still plug in my Pavilion into my TV and use it to watch internet moves through (graphics worked ok for external monitors so it probably was the display). But tonight I decided to gut for parts my little Pavilion so it will be no more.
Work gave me a hand me down laptop and told me to use it last year so I have been. Compared to my Pavilion and my ASUS the thing was a dog (incidentally it is a high-end HP work station laptop). Today I couldn't stand how slow my work laptop was running so I yanked the Samsung SSD out of my Pavilion, cloned my work hard drive to it, and popped the SSD into my work computer. Now my work computer is tolerable. It felt like I was ripping out the soul of my little Pavilion though.
So there it is. I was really blessed at purchasing that laptop at the time for under 600 and having it serve me so well. I didn't research the purchase and bought it at Best Buy, usually two ingredients for a recipe for disaster, but I lucked out. I see you can buy these for under 200 bucks now, and most coming with an SSD. For that price this laptop is still a good value, but my ASUS with all it's great specs is more of what I need now.
So I raise a glass and toast a great piece of technology that served me well: The HP Pavilion dv6-6c35dx. I will probably yank the memory out of it tomorrow and toss it into the garbage as it isn't cost effective to try to fix the monitor. You will be missed.
I know HP laptops are hit and miss. I supported HP laptops at a huge corporate cube farm early in my career and some of the models HP put out where just horrible. I probably wouldn't have bought this one at all but dumped a cup of coffee on my Toshiba laptop and it fried. I needed a laptop for work now and at the time I liked the specs and the price of this HP so I took a risk and that little A8 Pavilion ended up being a great work horse.
Spec wise it was nothing that great, but for what I wanted to do with it it seemed perfect. Light to medium gaming, opened applications and booted up lighting fast due to the later added SSD, quiet, never over-heated. I miss it.
With Windows 10 coming out and Visual Studio 2015 on the way I had been debating getting a new laptop for a long time but this Pavilion just seemed to keep handling everything I could throw at it so I held off for awhile. One of my dogs helped me take the plunge though, as it got it's tale caught in the power cord and yanked my poor Pavilion (which I had dropped and punished numerous times before without every having any problems) onto the floor and munched the monitor or the graphics card. That was enough to in my mind justify buying a new machine.
I always felt kind of guilt though, like I had cheated. I could still plug in my Pavilion into my TV and use it to watch internet moves through (graphics worked ok for external monitors so it probably was the display). But tonight I decided to gut for parts my little Pavilion so it will be no more.
Work gave me a hand me down laptop and told me to use it last year so I have been. Compared to my Pavilion and my ASUS the thing was a dog (incidentally it is a high-end HP work station laptop). Today I couldn't stand how slow my work laptop was running so I yanked the Samsung SSD out of my Pavilion, cloned my work hard drive to it, and popped the SSD into my work computer. Now my work computer is tolerable. It felt like I was ripping out the soul of my little Pavilion though.
So there it is. I was really blessed at purchasing that laptop at the time for under 600 and having it serve me so well. I didn't research the purchase and bought it at Best Buy, usually two ingredients for a recipe for disaster, but I lucked out. I see you can buy these for under 200 bucks now, and most coming with an SSD. For that price this laptop is still a good value, but my ASUS with all it's great specs is more of what I need now.
So I raise a glass and toast a great piece of technology that served me well: The HP Pavilion dv6-6c35dx. I will probably yank the memory out of it tomorrow and toss it into the garbage as it isn't cost effective to try to fix the monitor. You will be missed.
Wednesday, August 24, 2016
Telerik and Webforms: Trimming Paste on a RadComboBox
I had an issue with being able to trim incoming text into a radcombobox. The code below is really simple but it took me a bit to figure out. I'm stuck not using the latest release of Telerik's ASP.Net webform controls so maybe there is a different way to do this with later versions, but this worked for me.
I'm plugging into the RadComboBox's OnClientItemsRequesting by setting it to "MyItemsRequesting"
function MyItemsRequesting(s, e) {
var txt = e.get_text();
if (txt != txt.trim()) {
e.set_cancel(true);
var d = document.getElementById("mymasternamepageifany" + "_mydropdownid_Input");
if (d != null) d.value = txt.trim();
s.requestItems(txt.trim(), false);
}
/* more code */
}
Tuesday, August 02, 2016
Free FTP Program WinSCP
I've used the command line, File Explorer FTP, Smart FTP, Filezilla, and now have settled on the free WinSCP program for FTP type stuff. It supports ftps and other formats and seems to work pretty well. It is also automatable but I haven't played with that yet.
Check it [HERE].
Check it [HERE].
Visual Studio Image Library
Remember that pack of icons in Visual Studio 2010 that you could use in your projects? I noticed them missing in Visual Studio 2015. Apparently in order to save space Microsoft now has them as a download now.
You can download these icons [HERE].
You can download these icons [HERE].
Thursday, June 30, 2016
Importing Access Tables into Sqlite
There are numerous ways to do this, this is how I did it.
- Download LibreOffice.
- Use Base to open your access .mdb database
- Right click on the table, click copy.
- Open Calc, create a new spread sheet, control V to paste in data that is in memory from when you right clicked copy on the table in Base.
- Export your new spread sheet in CVS format (I left all the default options).
- Open your SQLite DB (I use the SQLite Manager Plugin for Firefox to Manage SQLite DBs).
- Import the CSV file (again I left all the defaults except I did click use the first row as a header).
- Once imported, you can tweak the headers. If the datatypes are slightly off, you might have to create a new table how you like it and then select into that table from the newly created imported table.
Friday, May 06, 2016
Disable Codelense for Faster Visual Studio Performance (Visual Studio 2013+)
My work computer is an older machine that comes to an absolute crawl when opening up Visual Studio 2015. One thing I did today to speed things up is to disable Codelense.
What is Codelense? It is that new feature where if you are working in a team environment when you open up code you can see who created various pieces of code and how many modifies have happened to it and by who, plus probably other stats I'm unaware of. All fine and good but at the cost of a lot of performance I don't want it.
To disable Codelense-
Tools->Options->Text Editor->All Languages->Codelense.
Why Codelense is under Text Editor and all languages doesn't make a lot of sense to me but whatever.
This might help speed things up for you. Happy coding.
More here-
https://stackoverflow.com/questions/20457796/how-to-turn-off-codelens-references
What is Codelense? It is that new feature where if you are working in a team environment when you open up code you can see who created various pieces of code and how many modifies have happened to it and by who, plus probably other stats I'm unaware of. All fine and good but at the cost of a lot of performance I don't want it.
To disable Codelense-
Tools->Options->Text Editor->All Languages->Codelense.
Why Codelense is under Text Editor and all languages doesn't make a lot of sense to me but whatever.
This might help speed things up for you. Happy coding.
More here-
https://stackoverflow.com/questions/20457796/how-to-turn-off-codelens-references
Tuesday, April 19, 2016
Crappy Hardware Not Worth It
OK, so for work I have the latest and greatest laptop...
Well, it was 5 years ago.
My work insist on buying "corporate" grade laptops that cost thousands of dollars. The CIO gets the newest once a year or two, and then those of use who are remote get the hand-me-downs. I'm about on the third wrung down.
I noticed something. My home laptop, which is the latest and greatest ASUS light weight gaming laptop of course :) boots up including entering my login in under 10 seconds. From there I'm ready to go.
On my current hand-me-down work computer it is taking me from initial startup to actually having Visual Studio and a few other things up about 5 minutes.
So, for an argument for me at least a "consumer" grade gaming computer that rocks for about 1000 bucks-
Say I lose 2.5 minutes of productivity a day with booting my work laptop up and opening up software which is being generous (Visual Studio 2015 sometimes takes 2 or 3 minutes to boot). So I'm not going to tell you how much I make but let's use a 50 dollar an hour figure. Let's also take a 48 week work year.
48 Weeks x 5 Days a Week x 2.5 minutes = 10 hours a year of wasted productivity time x $50 and hour = $500 bucks.
Now considering corporations can right off hardware purchases as a business expense that is the equivalent of about $600 of buying power. So that gives my company about $1200 worth of purchasing power for getting me a new laptop every two years. And I would be totally happy with a "consumer" gaming machine (which has plenty of power and reliability) over a "corporate grade" block that cost 2x more.
My last "consumer" grade machine which at the time I also used for work because I didn't want the hand-me-downs ran flawlessly for about 14 hours a day 6 days a week for over 3 years while my co-workers "corporate" laptops tended to have issues.
Note, I haven't brought this up at work yet or cried about it there, but I might.
My last "consumer" grade machine which at the time I also used for work because I didn't want the hand-me-downs ran flawlessly for about 14 hours a day 6 days a week for over 3 years while my co-workers "corporate" laptops tended to have issues.
Note, I haven't brought this up at work yet or cried about it there, but I might.
So there is some ammo you can use for someone to justify getting a new machine.
Thursday, April 07, 2016
Common Free Software Packages I Use
Not too long ago I had to install all my apps on a new windows laptop. In doing so I made a list of windows applications that I commonly use that are free or essentially free. I hope it is useful.
- Winamp - the old stand by for playing MP3 files.
- irfanview - another old stand by for image viewing and quick manipulation
- e-sword.net - I'm a Christian, this is a great Bible / Bible study free package. MySword on Android is good as well.
- Virtual Clone Drive - Why burn an ISO to a DVD to use it if you don't have to?
- 7-Zip (or Winzip) - Extends your base OS zip and unzip functionality to support more file types (like RAR files)
- Libre Office - Decent enough, why pay for office if you don't have to?
- Paint.Net - It ain't Photoshop but it will do in a pinch and it is free.
- Visual Studio Community Edition - Essentially a full version of Visual Studio for free.
- SQLite Manager Extension for Firefox - using SQLite more and more for more and more things. This extension for Firefox is kinda like SQL Manager for Sqlite. There might be better ones but this one works great for me.
- Notepad++ - I usually just use notepad but sometimes I like editing by column and Notepad++ supports that, also has great syntax highlighting support.
- CC Cleaner - Keeps your Windows registry clean
- Macrium Reflect - Need to clone a drive hassle free? This is your beast.
- Blender - For a little 3D fun
- K-Lite Mega Code Pack - To make sure I can play videos from my phone.
- Freemind - Mind mapping software.
- CDBurnerXP - Free CD and DVD burner (not sure about Blue Ray support)
- VLC Media Player - Free DVD and other format watcher
Maybe one day I'll come back and link to all these programs but you people are smart and can copy/paste into a google search like the rest of us. Maybe there is one or two on the list you haven't heard of or had forgotten about. Know of any that you think should be included on this list? Add them to the comments.
Monday, March 07, 2016
Great Piece Disk Cloning of Software: Macrium Reflect
I got a new laptop and needed to clone a drive. I saw reports saying that older Samsung drive software doesn't work with the new mk 2 SSD drives. So I read a few recommendations for Macrium Reflect and gave it a whirl.
I cloned my 7200 RPM drive to my new SSD (including copying some hidden partitions just to be safe). Went to the bios, changed to the boot order, and the SSD booted right up. Took about 45 minutes. I didn't have to hassle with boot sector / partial re-install of Windows 10 either.
Highly recommended piece of software. I just used the free version, but the other versions can do all sorts of things like backup restores, imaging, and get this...into dissimilar hardware.
Check it here-
http://www.macrium.com/reflectfree.aspx
I cloned my 7200 RPM drive to my new SSD (including copying some hidden partitions just to be safe). Went to the bios, changed to the boot order, and the SSD booted right up. Took about 45 minutes. I didn't have to hassle with boot sector / partial re-install of Windows 10 either.
Highly recommended piece of software. I just used the free version, but the other versions can do all sorts of things like backup restores, imaging, and get this...into dissimilar hardware.
Check it here-
http://www.macrium.com/reflectfree.aspx
Friday, October 16, 2015
Windows 10 WiFi Issue
Problem: You go to a coffee shop or other wifi network that's password changes often. You try to log on, but the password has changed. There is no new place to enter the password.
Solution: Turn WiFi off. Go to Advanced Settings. Click Manage pre-existing networks. Find the network that you wish to connect to. Click on it. Then click forget. Go back and turn wi-fi back on. Connect, it will now ask you for a password.
Subscribe to:
Posts (Atom)