MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.

As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.

x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Saturday, March 06, 2021

You're doing this at your own risk. If you think you might want to vet each step, you should. 

Worked for me. Your mileage may vary.

  1. Download exiftool, an open-source, Perl [sic]-powered tool
  2. Install the exe somewhere and get its location
  3. Create a .bat file with this content (hat tip):
    • for %%v in (*.%1) do c:\path\to\exiftool.exe -all= "%%v"
    • If you want it to recursively spider down folders, use this:
      • for /r %%v in (*.%1) do c:\path\to\exiftool.exe -all= "%%v"
  4. Call the .bat file in the folder where you have the images
    • C:\path\to\myBat.bat jpg
    • Note that this does one extension at a time but you can enter * instead to do every file (including non images) in the directory
      • C:\path\to\myBat.bat *
    • You could also rewrite that bat command to look for common file extensions.
  5. Profit.
Exif has a lot of crappy stuff. I was getting ready to post some PodSwap pictures and didn't necessarily want to let you know where I took them. This seems to have gotten rid of it.

Labels: , , ,


posted by ruffin at 3/06/2021 01:03:00 PM
Wednesday, November 16, 2016

I went to build an app package for my newest app -- Podcasters' RSS Feed Generator, which does, not surprisingly, exactly what it says it does -- I got the following error in Visual Studio.

App manifest references the image 'Assets\StoreLogo.png' which does not have a candidate in main app package.

Turns out this is a pretty cryptic error. We get a partial answer from hololens.com:

Best Answer

... but it's not quite that easy. You can't simply rename the file; the images also have to be exactly the right size. Painfully, all the .scale-xxx extensions to the names that I had weren't from Unity; they were from Visual Studio. Et tu, VS? That stinks. Microsoft is helping me create a situation they don't support.

Anyhow, the three I had complaints about with their "correct" sizes are:

  • StoreLogo.png: 50x50 pixels
  • BadgeLogo.png: 48x48 pixels
  • Square71x71Logo.png: 142x142 pixels (of course, right?)

Blasting all the old ones with StoreLogo, etc, in the name and then dropping the new, "correctly-sized" replacements into the Assets folder, then including them in the project from VS, does the trick.

Or so I thought. Now I get...

Severity

Description Project

Line

Error

App manifest references the badge
logo image 'Assets\BadgeLogo.png'
which does not have valid dimensions. It must be 24x24 pixels.

19

Error

App manifest references the square
71x71 logo image
'Assets\Square71x71Logo.png' which
does not have valid dimensions. It
must be 71x71 pixels.

20

Which is it, dang it?

Visual Studio complaining about BadgeLogo sizing, though we have the size the error window asked for earlier

Answer: Apparently we wanted the sizes the error window wanted. Ignore errors like the ones pictured, above.

Labels: , , ,


posted by ruffin at 11/16/2016 01:56:00 PM
Monday, October 24, 2016

I'm close to releasing my second application to the Windows App Store, and have gotten just good enough at dealing with icons -- not a rocket scientist-level task by any stretch -- and thought I'd share.

Buy an icon

First, you need a square png (or other common format) of your icon that's at least 620x620 pixels. You can get a nice rounded image, but for the Windows Store, at least, a full square is better.

In my experience, it's not too difficult to trade a couple weeks of waiting (in case you get a bad contractor) and $5-$15 to get a servicable icon from fiverr.com. I've used folks from Pakistan each time, strangely enough, and gotten very good results three times, most recently with foxsquare. You do need to be respectful to some degree, as their contract says, "We Do NOT Take Order related to Pork, Nudity, Alcohol & Gambling." So far, so good for me.

Here's my latest, a design for a podcast feed creator. I wish the angles on the orange circles were perfectly symmetrical, and that the little "i" icon didn't reach the bottom of the image, but all things considered, this is a heck of a lot better than I could've done in several hours' work. It's a steal at $15 with .psd.

podcast feed icon

package.appmanifest

To insert the icon into your UWP app, open up your package.appmanifest file from Solution Explorer, and hit the Visual Assets tab.

appmanifest

Now you have a pretty simple interface to upload icon imagery. I recommend clicking on each of the lines from "Square 71x71 Logo" on down.

Resizing your original

For each one, you'll want to upload resized versions of your original icon. "But how do I get those resized images quickly?" you ask? That's easy if you download IrfanView, the handiest image viewer I've ever used.

Can't recall how many years I've used IrfanView now, and I was impressed to learn that it has extensive command line support.

First name the original square.png. Then run a bat file that resizes everything.

Here's the bat file I'm running, though you may have to change to the path where you have IrfanView installed:

"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(284,284) /aspectratio /resample /convert=.\284.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(600,600) /aspectratio /resample /convert=.\600.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(300,300) /aspectratio /resample /convert=.\300.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(620,620) /aspectratio /resample /convert=.\620.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(176,176) /aspectratio /resample /convert=.\176.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(200,200) /aspectratio /resample /convert=.\200.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(96,96) /aspectratio /resample /convert=.\96.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(88,88) /aspectratio /resample /convert=.\88.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(50,50) /aspectratio /resample /convert=.\50.png
"C:\Program Files (x86)\IrfanView\i_view32.exe" .\square.png /resize=(24,24) /aspectratio /resample /convert=.\24.png

pause

Boom. Done.

resized icons

Now go into the appmanifest UI and click on every largest size available for each asset line, then add your image.

NOTE: Some of these already have placeholder X images in your project. OVERWRITE THEM. You can overwrite in addition to the ones you're uploading to ensure you have decently high quality images.

how to upload icons and which to override

Rectangle splash and wide logos

This will leave you with just two assets unfilled, both rectangular. One is the "Wide 310x150" and the other the "Splash Screen" logo.

I kinda cop out here. I could probably get fiverr to make me some, but instead I open Ms. Paint.

The size we need is 1240x600. I tell Paint to create a new image, then I hit "resize" (Ctrl-W, strangely enough), and get it to 1240x600.

resizing in Paint

Make sure "Maintain aspect ratio" isn't checked.

Then I use the paint bucket to fill that all black. Finally, I paste in the 600x600 image IrfanView created and slowly move the middle pixel over until it's at 620 pixels into the image in Paint. Very high tech.

high tech centering success pants

Save it and put into both of the assets you had left.

Voila! The end. Cheap and quick.

Labels: , , , , , ,


posted by ruffin at 10/24/2016 12:12:00 PM
Wednesday, September 14, 2016

Note to self: Never create images for documentation until you're done with your release. No, no no. ALL the way done with your release. I thought I could "get started" on my docs a little early, so I did. Not the worst idea ever, but I recently added a new toolbar button or two. I got lucky, I think, and can use my old images, like this one:

help image

... since it's so tiny you can barely see what's in the toolbars. But if it'd shown one extra in the bottom or all of the top, I'd be remaking them now.

top command bar for MarkUpDown

See that header button way over on the right? That's new.

bottom command bar for MarkUpDown

And then for some strange reason I put the "Find" button on the bottom. Argh. That was close.

I won't say anything about that tab close "X" in the first image next to the "New 0" file tab. Except that if you'd been reading, you'd know I just added that. That may or may have been retroactively added to the original image. Ms. Paint, indeed.

Labels: , , , ,


posted by ruffin at 9/14/2016 10:03:00 AM
Thursday, September 01, 2016

Ah, the power of MSPaint.exe. (Just realized there's a Ms. Paint pun in there somewhere. How many years have I been using this?)

I'm writing a Markdown editor. Its super-original name is MarkUpDown. (I'd originally thought I'd name it MarkUpMarkDown, but emailed John Gruber to see if that was kosher, since that really is too close to Markdown, and he objected to CommonMark's original name, "Standard Markdown". No response, though I could see how "Standard" seems presumptuous in a way I trust a bad pun like MarkUpDown is not.) I used Fiverr to get some icon artwork made, and it was pretty good. Just one problem that didn't occur to me until a few weeks later.

Give yourself a second. You'll see it.

It's not MarkDownUp, it's MarkUpDown. /sigh

I have the psd, so I, in theory, could make my own lossless changes (I spent a little more than Fiverr's $5 to get that, but not much more), but when I tried, the export from the Gimp was super pixelated.

I really like the Gimp, I do. I used it to create the animated gifs on my MarkUpDown home page. But sometimes it takes a lot longer to figure out than it's worth to get something simple done.

(I'm suspicious I should pay $1500 for a good Gimp training course and watch that pay back insane dividends over the rest of my career, but I also don't want to get to be known as "the image hack guy" either.)

Anyhow, I put together a request for my Fiverr guy, and included an image I'd hacked in Ms. Paint (and then Skitch) to show what I needed changed. Took me a little longer than I would've thought, but showed what needed to get done.

Two circles

And then it hit me: That image on the right didn't look half bad. If I didn't hear back (and I didn't. He at least temporarily closed shop shortly after I left the request), I figured I had another option. If I took a little more care to line the arrows up where they were initially, I'd have something.

Not too shabby for a few hours' work (I actually did this and three other images, two of which were wider than tall and required some more serious editing), right?

MarkUPDown

Looking at it again, it looks like the down arrow needs to go a little further towards the edge to match the original, but I think I'm okay with it.

I'll blog about figuring out badges and icons and naming conventions for Visual Studio later, perhaps. Right now, I'm going to relax in my reasonable success with crazy mspaint.exe.


(You might wonder if the Fiverr design copied the "Markdown icon" too closely. I don't think that's a problem -- it was designed, and copylefted (actually put into the public domain), by Dustin Curtis.)

Labels: , , , , ,


posted by ruffin at 9/01/2016 05:32:00 PM
Monday, February 22, 2016

Quick quote from High Performing Agile Teams: An Introduction on the Quality is Speed blog:

The parts of Agile I hate are the parts that ignore this essence. High performing teams are the goal. Not practices. Not user stories. Not estimation. Not Scrum. Not the manifesto. Not TDD. Too often the practices become the goal while we lose sight of the real goal: high performing teams.

Yes, thank you.

In other news...

The question in question [sic] is bad news on a couple of fronts, but the one Shackles doesn't like is this bit:

SqlConnection con = new SqlConnection(@"server=MOON\SQLEXPRESS;"
    + "Initial Catalog=Moon;Integrated Security=True");

Ooops!

Had a similar thing happen to me recently creating the image upload service for my Markdown editor. It was surprisingly easy to set up the call to the API in C#, but it quickly occurred to me that it was also really easy for someone to Fiddler what I was sending, grab the API keys, and use my account to upload as much jive as they wanted.

I contacted Mashape to see if there wasn't some way to put a cap on my account, thinking I could just cross that bridge if I ever came to it. I mean, what's the point of limiting exploitation potential if nobody's going to buy the danged app to start with? (I'm an inveterate optimist, as you can see.) Then if I ever, say, hit $20 in a day (which would mean something like 21,250 image uploads in 24 hours), I'd quickly write an API, through it into the cloud, change the API keys, release a new build, and be done with a little egg on my face.

Well, Mashape never got back to me, so in an abundance of caution, I wrote the cloud service. Kinda a pain, atc. I eventually settled on a system of requesting an access key, creating a trivial hash that creates the key, giving the key a sunset time, then matching that key to upload requests. If someone hits more than X in period Y, they're shut down. If the whole system receives more than Z in Y, everything shuts down.

So I have my own rate limiter, and my API key, like the database connection in the bad SO question, is reasonably hidden. I mean, there's still a chance my cloud gets hacked and the code gets out, but that's a lot more difficult than grabbing Fiddler and sniffing API keys, even if they're SSL'd (which they weren't, initially).

Kinda painful how quickly a small feature addition because a pain, but at least I've got a nice cloud-based API presence now. On the down-side, I'm back to thinking I need to figure out how to move my entire website over to Linode eventually, as it's sooooo much cheaper to admin it all yourself.

PS -- How in the world did Redis get so popular for small-time hosted app services? I mean, if you have a distributed system, I get it, but if you want an in-memory key-value store for a single box, why would you bother? Just keep a dictionary in memory, right?

Labels: , , , ,


posted by ruffin at 2/22/2016 01:15:00 PM
Monday, January 11, 2016

It's kind of a pain to save transparent layers in images when you're a programmer by trade and just want a few placeholder images. On the Mac, Paintbrush'll do it, but you've got to watch a YouTube video with the craziest background noise and grossest random colors ever to learn how.

You'd think there'd be an easier way on Windows, but for png, there's kinda not. Paint.NET is a common suggestion, and a good one. But wouldn't it be nice if IrfanView made it easy for you?

It doesn't. At least not with pngs. But with gifs? Child's play, as explained on this webpage from 2004:

  • Save as GIF - Choose GIF. Choose GIF - Compuserve GIF from the drop down menu.
  • Save as GIF - type in filename. Make sure that 'Save Transparent Color' and 'Choose transparent color during saving' boxes are checked. Type in the filename. Hit the Save button.
  • Set Transparency. Place your cursor anywhere on the background of the depicted image and click on it to save.

Check out this groovy how-to image. Groovy. But here's a screenshot I took, just because the llizard guy seems copyright paranoid:

And just to prove the point, here it isn't for png:

PS -- This may be a better option. Requires some setup, but then you've allegedly got transparency at a right-click in explorer whenever you need it.

Labels: ,


posted by ruffin at 1/11/2016 02:37:00 PM

<< Older | Newer >>


Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ยข, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.