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.
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!

Monday, October 16, 2017

After watching the fabulous video, here's what I think I learned... (There's the mention that other OSes have "other attack vectors", but if this is the worst, well, it's a lot more trouble than starting FireSheep...)

https://www.youtube.com/watch?v=Oh4WURZoR98&t=56s
YouTube Mathy Vanhoef
KRACK Attacks: Bypassing WPA2 against Android and Linux

  • Clones network on different channel
  • then it only works on "improperly configured websites", like uk.match.com (edited)

https://www.youtube.com/watch?v=Oh4WURZoR98&t=1m11s
YouTube Mathy Vanhoef
KRACK Attacks: Bypassing WPA2 against Android and Linux

Quote:

"we make sure the victim can access the internet through our malicious network"

  • Course I'm assuming this youtube dude knows what he's talking about
  • Might be paper author?
  • here's the real trouble:

https://www.youtube.com/watch?v=Oh4WURZoR98&t=1m52s
YouTube Mathy Vanhoef
KRACK Attacks: Bypassing WPA2 against Android and Linux

Quote:

Hacking app has to start "sending special wifi frames that can command android to connect to a different channel", which is the OS specific side of the vulnerability for Linux and Android.

  • ^ And there's your issue. :wink: So not super simple, but not a copper wire tap either

And even then, you'll lose the https badge in your browser when you're on those "improperly configured sites". Not good, but not a wide-open Heartbleed either, if I understand it correctly.

Labels: , , ,


posted by ruffin at 10/16/2017 11:03:00 AM
0 comments
Thursday, October 12, 2017

Today, I had to make up some quick wireframes for a possible freeware iOS app. I did a quick google to find a free wireframe tool, and boy, they're almost all pay to play, or not only are they pushing you to pay to play, the few free features are hidden behind a sign up you have to perform before downloading.

I did manage to find a decent one in wireframe.cc. Not heavy on the tooling -- I think it brags about being minimalist -- and there are a number of things you have to roll... yourself... every... time (like buttons, which are rects with rounded edges that you then drop a label on top of and move together later), but for free, it's very nice.

Here's an example of one screen from the insanely complicated (har har) UI I made.

Have We Seen You? UI

(I'm helping a charity that distributes goods, and wants to ensure they haven't served anyone twice before everyone's been served, regardless of location. At the same time, we want to track an absolute minimum of information, and nothing that could be used as PII. So voila.)

I didn't see a way to use my own image, like a gear icon for settings, but for a mock-up, it's perfect. Quick and painless.

Labels: , ,


posted by ruffin at 10/12/2017 01:42:00 PM
0 comments
Tuesday, October 10, 2017

I had no idea T-SQL's CONVERT had special codes for converting dates. Well, it does.

From How to use ROW_NUMBER() to enumerate and partition records in SQL Server - CodeProject:

Here is our final SQL statement, which achieves the business logic we wanted to implement.

SELECT
       [PersonID]
      ,[FamilyID]
      ,[FirstName]
      ,[LastName]
      ,[DateOfBirth]
      ,ROW_NUMBER() over(PARTITION BY FamilyID,
                         CONVERT(NVARCHAR(25), DateOfBirth, 111)
                         ORDER BY DateOfBirth ASC) TwinCode
  FROM [People]
ORDER BY PersonID

IIn the ROW_NUMBER function above, I am doing several things. I’m grouping on FamilyID, and also grouping on a converted DateOfBirth. I convert the DateOfBirth to an nvarchar using the 111 conversion code, because that gets results like ‘2009/10/11′ and ‘2009/10/12′ which can easily be grouped by to achieve distinct dates. [emph mine -mfn]

The full list is here, at docs.microsoft.com. Here's a taste...

Without century (yy) (1)With century (yyyy)StandardInput/Output (3)
-0 or 100(1,2)Default for datetime and smalldatetimemon dd yyyy hh:miAM (or PM)
1101U.S.1 = mm/dd/yy
101 = mm/dd/yyyy
2102ANSI2 = yy.mm.dd
102 = yyyy.mm.dd

Labels: , ,


posted by ruffin at 10/10/2017 07:26:00 PM
0 comments
Monday, October 02, 2017

If you're cherry picking from one pushed (or will-be-pushed) branch of your codebase to another (pushed or will-be-pushed), the command you're looking for is...

git cherry-pick -x <commit-hash>

From the git docs:
-x
When recording the commit, append a line that says "(cherry picked from commit …​)" to the original commit message in order to indicate which commit this change was cherry-picked from. This is done only for cherry picks without conflicts. Do not use this option if you are cherry-picking from your private branch because the information is useless to the recipient. If on the other hand you are cherry-picking between two publicly visible branches (e.g. backporting a fix to a maintenance branch for an older release from a development branch), adding this information can be useful.
The warning about private branches only makes sense: If that SHA is never shared, the value isn't useful.

If the only person to see your repo is yourself, I'm not sure if the SHA falling in the cherry treed woods makes a sound or not. Probably up to the SHAer.

Labels: ,


posted by ruffin at 10/02/2017 02:51:00 PM
0 comments
Thursday, September 14, 2017

Are these popover page previews on Wikipedia new? I got some checking out a discussion on Mike & Mike [sic], but didn't see them on other pages, and now they're gone on the original too.


They're pretty neat. A little intrusive at times, and seems a lot like what macOS does with Safari previews. But certainly easier to manage than the web of wikipedia tabs I usually end up opening during a research rabbit hole.

Labels:


posted by ruffin at 9/14/2017 09:27:00 AM
0 comments
Thursday, August 24, 2017

From Video purports to show testing of Apple 'iPhone 8' with rear-mounted Touch ID:

A video published on Tuesday allegedly shows Apple's "iPhone 8" in quality control testing —with a rear-mounted Touch ID sensor, despite most recent rumors discounting that possibility.

Picture from AppleInsider video of Touch ID on back of iPhone

If you've been watching the rumor mills this year, you'd know Apple's had this option of last resort in their back pocket for a long time. What's important to learn is how much otherwise risky innovation this sort of back-up planning enables.

And if you have been not just watching, but watching closely, you've seen a pretty interesting narrative grow around this year's iPhone rumors. I actually do believe Apple was, until the last moment, trying to embed Touch ID in the screen. I'd also buy the rumor that at least one team at Apple was sweating bricks, worried the in-screen Touch ID was going to get the cut, and were scurrying to get it to work at scale.

The reason they could wait until the last minute was precisely because they had Touch ID on the back of the phone ready to go. If the only other option they were left with was retina scanning, Apple Pay could've been in trouble. Can you imagine if iRetinaScan 1.0 had a flaw? Now what happens to Apple Pay for those who shelled out for your latest phone? Do they simply lose access to Apple Pay, now that you couldn't keep it secure? If you thought AntennaGate was a big deal, wait until Retina-Apple-Pay-Gate.

I'm not saying Apple is excited about back of the phone Touch ID (if it's really going to be used -- I suppose even if this video is legit, Apple could spin up a few mock lines without releasing that design), but it's better than nothing. Now you can include retina scan as the primary access point but not bet the farm on it working.

I've been letting an idea for a post stew for a while about how Apple has been remaking hardware to fit in previously designed shells. The original iMac is a good example, as it went through a number of iterations before the shell changed.

Starting with the latest iPod touch refresh, however, I think we hit a new gear with hardware design. And with the iPhone 7S or 8 or whatever it'll become, now we're no longer putting, say, last generation's innards into a previously released case, but ensuring that we can use either option 1 or option 2 with the next generation's shell. We saw, for example, two winners in the latest MacBook Pro. The touch bar MacBook Pro and the MacBook Pro Escape are two completely different animals, as I mentioned last December. Who knows how many other designs were created for the same basic aluminum laptop that didn't get chosen.

My budding claim is that Apple's MO is now to finish the outer shell well before a final decision has been made on what precisely is going inside. And to swap the choice on insides at the last minute is no longer a big deal, giving Apple lots more room to experiment within a generation.

These different design needs are, to steal from Rumsfeld again, known unknowns. If you know you're down to 5 either-or decisions for insides, you can build an exterior that anticipates every combination of them. If there's no back of the phone Touch ID, there's probably a tiny bit of space between the silicon and case that goes unused, or is now used by a battery with a slightly different design. If there is a back of the phone Touch ID, the changes to the rest of the hardware aren't just minimal, they're already completely anticipated.

I'm going to bet this sort of "planning for known unknowns" is exactly what Apple's doing, and doing better than anyone.

Labels: , , ,


posted by ruffin at 8/24/2017 07:11:00 PM
0 comments
Tuesday, August 15, 2017

Ran into this question about diffing blocks of text on StackOverflow yesterday after KDiff3 and WinMerge both went crazy trying to diff a file where I'd simply mostly just grouped and, therefore, rearranged lots of methods. Seems like an easy issue, but as that question points out...

Is there a diff-like algorithm that handles moving block of lines? - Stack Overflow:

But it falls down when blocks of text are moved within the file.

Suppose you have the following two files, a.txt and b.txt (imagine that they're both hundreds of lines long rather than just 6):

a.txt   b.txt
-----   -----
1       4
2       5
3       6
4       1
5       2
6       3

diff a.txt b.txt shows this:

$ diff a.txt b.txt 
1,3d0
< 1
< 2
< 3
6a4,6
> 1
> 2
> 3

That really is painful, when it should be a reasonably easy process.

Now I've tried to write my own diff engine before in my usual bullheaded, straight-ahead style, not worrying about efficiency until after something's working. It's not easy. But what you can say is that if you take it as your primary mission to find block movements, it's a lot easier. Enter wikEd diff Online Tool - Cacycle, "The Only JavaScript Diff Library for Visual Inline Text Comparisons With Block Move Highlighting and Character/Word-Based Resolution".

Results are pretty good, both for the simplest case from the SO question, to real-world code.

wikEd example using example from SO question

(The green highlight is for grouping a block, but by default it ignores/doesn't highlight any moved blocks, which is nice when you're diffing code like I mentioned before...)

Now I have to resist the desire to put this into a full-fledged UWP app whose goal is to be a diff tool. There are smarter things to write on my own time. Please realize this, self.

Labels: , ,


posted by ruffin at 8/15/2017 10:02:00 AM
0 comments

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.