Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×
User Journal

Journal: Leveling up with python 2 2

Journal by smitty_one_each

$ py
Python 3.4.3 (default, Jun 14 2015, 02:11:57) [MSC v.1800 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> dat="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingMFA.html"
>>> print(dat.split("/"))
['http:', '', 'docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[1:])
['', 'docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[2:])
['docs.aws.amazon.com', 'IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[3:])
['IAM', 'latest', 'UserGuide', 'Using_ManagingMFA.html']
>>> print(dat.split("/")[3:-1])
['IAM', 'latest', 'UserGuide']

I hadn't ever used the python REPL to work on a bit of code, but it sure makes exploring the slicing notation easier.

User Journal

Journal: Winduhs

Journal by squiggleslash

I think the whole mobile operating system thing has screwed up GUI design to a certain degree. Microsoft, Ubuntu, and GNOME have both been brave and tried something new, but what they ended up with ended up being highly unpopular on the desktop. And to be honest, I think only Microsoft ended up with something truly good on a touch interface, though I admit to not using Ubuntu or GNOME in those contexts, just being aware that they've not really encouraged an ecosystem for applications to work well in a tablet environment, leaving users with only the main shell being friendly. So the loss of optimization for the desktop lead to no significant gains elsewhere.

The way I'm seeing it, Windows 10 seems to be genuinely exciting, and a decent modern desktop, that also encourages cross interface design. Microsoft has learned from the mistakes it made with Windows 8, kept the good parts, and put together something truly great and modern.

I don't really want to be stuck with Windows though as my primary OS. I'm hoping Ubuntu et al actually learn from it.

This is something you'll never normally hear from me, but perhaps they need a Miguel type figure to take a lead in either GNOME or Ubuntu. At this point, at least to me, it looks like Microsoft is the one with the good ideas about how a UI should work and the relationship of an application to the UI frameworks of the underlying OS. I don't want anyone to clone Windows, but it would be nice to learn from it, at least.

Back in the 1990s, nerds like me put together our own "desktops", running random window managers, app launchers, and file managers (if that) that seemed to go together. I'm feeling like the FOSS "desktop" is heading back to that era, of stuff that doesn't really go together, being shoehorned to fit, with no real philosophy binding the system together.

User Journal

Journal: Chronicle: Yesterday's bike ride

Journal by Chacham

Rode my bicycle yesterday for exercise, with intent to go to Meijers (The name, Meijer's Thrifty Acres, which people colloquial called "Meijers". The name has changed, removing the need for the possessive "s." Kids and sticklers now use the new name.) I did go there, stopping off at the Royal Oak Post Office en route.

The post office is a nice one. I used to have a PO Box there. They've since added inner doors to replace the gate locked at nighttime. The doors look nicer when closed, i guess, but also makes it look more office-like during regular business hours. The bike stand/rock was missing outside, so i used the railing on the accessibility ramp. It goes around like a hairpin, but gets more narrow in middle of the second half. Well, if whoever uses it can use the more narrow part, using the side of the excess shouldn't be an issue, should it?

Anyway, they're slow, but what government office isn't? When the guy two in front of me went up (without being called, to wait for the returning clerk, who asked if he was actually next when she came back) the guy in front of me went moved up. The line at the office is not straight. There is the counter and an open area for standing and leaving, then an island with a flat top and forms on the side. The line forms on the other side of the island and around the bend, where people usually wait to be called. So, both people in front of me were facing perpendicular to the direction i was facing. When two-in-front went up, one-in-front walked forward. I turn and got behind him, and he moved up just a little further. Obviously, he wanted room. So be it. I figured he might not kike Jews, so i didn't stare at him either. That is, i made sure to look away from him. He did his business and left. I needed only a minute, so i was out relatively quickly.

As i was beginning to ride away on my bike, he commented (while unlocking his car?) to me, "I never saw a rabbi on a bike before." I smiled and kept on riding. I still don't know what he meant by the statement or why he considered me a rabbi. Mayhap, he doesn't get out much. :)

Before i even got to Meijers, i was pooped, and realized i really needed the break before i could ride home. The stop at the post office elongated my trip more than expected, and i wasn't ready for that much exertion this summer, yet. I took my time in the store, including checking out the Italian section, and getting Turkish sun dried tomatoes. I may go back and grab some of the Pomi products (they had two, iirc) to see if they are that good.

On my way home, i evoked the same responses as usual. People stare at me biking. I think people stare at all bikers, or better put, intruders on their domain. Anyway, as i was riding down one street, i saw two boys playing a couple(?) blocks ahead. The first went inside. Seemed normal. I don't know if he saw me or not. The second saw me and ran inside too. Nope, not inside. As i passed by, i saw him hiding behind a bush. Did he think i might curse him or was he just afraid or shy? I wish could go back and ask. Or maybe watch a video online with comments. Hmm... bike cam, anyone? :)

User Journal

Journal: Chronicle: Warm office, but what can i do? (2) 2 2

Journal by Chacham

Well, two ladies came by in response to the request, at least one of which looked like she was dressed for dinner. I ignored them when they first walked by until they specifically asked for my attention. I had no idea that was normal business attire and really didn't think they were there for me.

Well, they have no half walls and no wall would make the desk fall down. I said i'd be willing to give up that part of the desk, but it didn't look like that was an option. We discussed the closed vent and i mentioned that it bothered other people in the past and i didn't want to bother them now. As they continued questioning, my neighbor piped in with her past experience. Finally, they suggested they would have an engineer look at the vent. I tried making a joke by telling them they could attach a pipe to the vent and put it down my back (which wouldn't bother anyone else...) One of them forced a small giggle. I don't even need retrospect to realize it was poorly timed. My mistake was to not appreciate that no comment is better than a bad one.

As they spoke i realized the were standing and i was sitting. Not being their superior, etiquette would demand that i stand, and stand i did. It's not something i always remember to do, as so many people do not. This etiquette in not a gender thing, but a respect thing. Sitting while other stand and speak to you is considered haughty (or inconsiderate, at the very least), or so i have been taught. A lot of people either disagree or just don't care.

I did bring in a thermometer today, changing the battery with a March 2015 expiry. It was 74+ all morning. When they left i looked again and saw it got lower, Right now its 72.5. Weird.

[I used the word "as" too much. Also i need to work on flow, as opposed to a collection of related statements.]

User Journal

Journal: Chronicle: Killed smss.exe 4 4

Journal by Chacham

I almost never reboot Windows at the office. It takes too long, requires turning off all the stuff the IT department uses to ruin my day, and wastes time getting things setup just right. Instead, i just hibernate, and bear the few minutes it takes to get back to normal. (Hmm.. very winteresting.)

This morning while "researching" why some system process (via Process Explorer) was hogging 200MB of memory, and tried restarting it. Luckily, it rejected the idea, and told me other processes relied on it. So, i clicked back to tree list, leaving it highlighted, and saw its progeny included smss.exe. Perhaps out of sheer ignorance, perhaps because i got it mixed up with sms.exe, i asked to restart it. Instant BSOD.

Come to think of it, that was really stupid. Firstly, killing the session manager would at best shut down the OS. But i should have researched it first. So silly. Please, laugh at me, heartily.

User Journal

Journal: Rant: Warm office, but what can i do? 8 8

Journal by Chacham

I really dislike the summer in the office. It gets warmer outside so the women start wearing less clothes. Then they complain the office is too cold. Really?! My water consumption went up this week, and i''ve been buying caffeinated drinks just to stay awake.

I have an air vent above me which was closed before i got here because the lady next cubicle over, who is very nice and sensible as long as she agrees with you, complained of being too cold. When i asked her about it, she said opening it would make her cold, require her to wear a sweater and socks (perish the thought!) and then take them off when she got outside, which would inconvenience her. About me, who gets much too hot and cannot take off my clothes, she offered me the ice pack she uses to keep her lunch cool, to place on my neck or in front or in back of my fan. I guess i'm just clothes-minded. Anyway, arguing with a coworker is not productive and only ends up in fights, if everyone stays employed. So, i'm looking for other solutions.

As our section of the cube farm is a set of four cubicles with their own walls, airflow is restricted. I made a request to maintenance to remove one of my walls or replace it with a half-wall (suggested by another clothes-challenged woman, who sits near a window (no windows can be opened)). That may allow for better air flow. The request went in yesterday, though i have to find out if that is the correct group to make the request to, and if this is allowed, or even if it would be approved.

In years past i've wondered why hot air made me uncomfortable and tired, yet outside i was fine. To wit, inside, at 72 i'm warm, 74 is uncomfortable, 76 is really uncomfortable and i am tired, and at 78 i've been known to blank out (depends on how tired i am). Outside, however, i can weather the 80s and love it. After reading and testing, i found the difference to be fresh air. I don't mind the heat, but the stale air. Take away my fresh air, and i'll need the air to be cooler. I'm assuming this is true for most people, though the range will differ.

Well, fresh air is out of the question here. The windows are closed, we're a few floors up, and the vent that would blow directly on to me has been closed. So, i need to be cooler. Iced and caffeinated drinks only work so much, cost a bit, and have other consequences. A personal air conditioner would seem best, but do those even exist? I mean, there are personal heaters which do the job well. But what about cooling the air? Fans do little more than move the air. I have a fan, but the walls of the cubicle stifle its already limited effect. There are sponge coolers that have mixed reviews. I'm looking for a(n impossible) air conditioner that would just blow the hot air under the cubicle wall (or the like), would be silent, and be powerful enough to cool me down. I don't need much more than that. Truthfully, any idea might work, as long as it is relatively noiseless and inconspicuous.

User Journal

Journal: Chronicle: Bought an S5 and Glass

Journal by Chacham

[This is a modified version of an email i sent. I'm too lazy to linky it up properly. Does anyone really care?]

I bought a used S5 off ebay for $241.50: "This phone was brought in December 2014 from T-mobile, it will come with the phone, original box, charger and case. If I can find the the head phones I will include them also. No scratches are on the phone and it is not unlocked, THIS IS A T-MOBILE PHONE" (I spoke with the guy via ebay's communication system and made sure it had everything, and he guaranteed he would take it back if there was anything didn't work right, including unlocking and the like.) So, it comes with a case. I then purchased a broken Zagg InvisibleShield Glass screen protector for $4.99 which seems to retail on Amazon for a little over $20 (with shipping.) Why broken? I'm glad you asked. It comes with a lifetime warranty, as the ebay auction stated. So, i sent an email to Zagg:

I'll just ask it directly.

If i purchase a broken invisible shield/glass, am i able to use the warranty to replace it?

For example, here's one on ebay: http://www.ebay.com/itm/ZAGG-invisibleSHIELD-GLASS-Samsung-Galaxy-S5-Screen-Protector-BROKEN-P74-/281699082921

I feel at least a little embarrassed about asking this, but as it costs about 25% of the full price, i just have to ask.

The reply was a standard reply completely ignoring my question but giving me the (easily findable) link to replace it. So, i bought it on ebay (delivery by this Friday), registered it, and started to fill out the replacement request, as they will put a hold on your card until they receive the replacement. But, the shipping and handling costs $5.99. Though still a good deal, that's just them covering the cost of their own product, as a google search theorized (because the shipping label shows the amount which, iirc, is $1.20) and suggested complaining:

I am trying to take advantage of warranty replacement for your excellent product (Samsung Galaxy S5 Glass), but shipping is $5.99! Isn't that a little expensive? The product is shippable for much less than that. Is there a way to knock down that cost to something more reasonable?

Well, another, possibly (mostly) standard email came this morning, including:

In regards to your email the shipping rates are generated by USPS and are fees that we in turn charge the customer as the shipping is not part of the warranty since we cover the full cost of the item. As a courtesy I have included a shipping code [redacted] that will waive your shipping as a courtesy. Please shipping is required for next time. Thank you again.

I would say that i feel evil and dirty, but i did the same thing last week. I ordered a book on ebay and "upgraded" it for $4.95 to get the ebook. (They allow you to register the book with no proof. Many people have noted this. I will buy the book first, but i don't mind buying a used one off ebay.) I haven't even received the book yet but am already in middle of chapter 1. The ebook book makes it easier to type in examples. (An essential practice for learning a computer language.) On second thought, maybe i do feel evil.

---

I ordered the replacement. I feel i must now do what i'm sure Zagg wants me to do, that is, tell everyone what a wonderful company they are. Their reputation already does that, but i don't mind screaming into a dark, possibly empty, room.

User Journal

Journal: Chronicle: Another day, another cup

Journal by Chacham

Well, my dollar store water bottle had a black dot in it, in spite of all my efforts to drain it and leave some air flow every day. In the garbage that went; i ain't playin' with that sort of stuff.

So, it was down to the cafeteria to get a styrofoam cup, which lasts a good few days before coming up with specks. At 15 cents for the cup, lid, and straw, it's not bad. I'm guessing i am allowed to take ice as well, but i'd feel silly asking the cashiers, who may not even know official policy, and worried if they act like they do. Stealing is stealing no matter what the item is. Regardless, i splurged and got Coke Zero, which clearly means i can take ice. Not much though. I want to keep it cold but not water down my drink.

At the register i saw a smallish bowl, half-full with pennies. I was thinking it was one of those win-win, give-a-penny-take-a-penny dishes, but at half full, looked a bit unused. So, i wondered aloud at her, "Pennies...does anyone use those?" She laughed. I was perplexed. Walking away, i felt silly.

User Journal

Journal: Verbiage: Some puns (2)

Journal by Chacham

As if Some puns wasn't bad enough, i shall here continue my plagiarism, brevity, and literary destruction:

Mick Jagger's dog asked his friend, Patricia Whack, for a loan, offering a small item as collateral. Puzzled, she asked her husband what it was. "It's a knick knack, Patty Whack. Give the dog a loan. His old man's a Rolling Stone."

Sixteen sodium atoms walk into a bar followed by Batman.

Did you hear about the man who got cooled to absolute zero? He's 0K now.

An infinite number of mathematicians walk into a bar. The first orders a beer, the second orders half a beer, the third orders a quarter of a beer, and so on. After the seventh order, the bartender pours two beers and says, "You fellas ought to know your limits."

Pavlov was sitting at a bar, when the phone rang. Suddenly he gasped, "I forgot to feed the dogs!"

Three logicians walk into a bar. The bartender asks, "Do all of you want drinks?" The first logician says, "I don't know." The second logician says, "I don't know." The third logician says, "Yes."

How can you tell the difference between a chemist and a auto worker? Ask them to pronounce "unionized."

What's the difference between an etymologist and an entomologist? The etymologist knows the difference.

At a hotel, the bellhop asked a photon if he had any luggage. "Nope." he answered, "I'm traveling light."

He's more classless than a Marxist utopia.
She's so mean she has no standard deviation.

That taxidermist really knows his stuff.

A grizzly without shoes is bear foot.

A lighthouse, rose trellis, windstorm, dune, and Halloween costume got together for a beacon, lattice, and tornado sand witch.

What do you get when you cross a joke with a rhetorical question?

User Journal

Journal: She's so false, even her ASCII 32 characters are lies 12 12

Journal by smitty_one_each
Slashdot's greatest knave should spring into action to defend Her Majesty against the latest tidbit:

New documents obtained by Judicial Watch and made public Monday show that then-Secretary of State Hillary Clinton and other senior officials under President Obama were given intelligence within hours of the Sept. 11, 2012, Benghazi attack describing how it had been planned at least 10 days in advance "to kill as many Americans as possible."

Instapundit notes: "THEN SHE STOOD NEXT TO THE COFFINS OF THE DEAD AND LIED" also "they locked up a filmmaker for a year, just to support their cover story. Nice people."

I realize it's more of a difference of degree than kind between her and any other megalomaniac running. However, I think that after eight years of electro shock therapy from #OccupyResoluteDesk, Her Majesty has the potential to turn an economic hangover into a full-on coma.

User Journal

Journal: Verbiage: Beginning to learn Java

Journal by Chacham

I'm reading Learning Java, which i recently purchased, and was typing in the examples from the book. As the book is a monster to hold, i ended up upgrading the ebook for $4.95. Dual screens with one for the PDF and the other for the IDE make it oh so much easier to type in. I also have been reading it on the macbook while in the tub. Nothing like cozying up with a language manual, eh? :)

It's hard enough to learn Java itself. I remember it from the 90s when it was slow, clunky, crashed browsers, and promised way too much. But, it's matured, and for better or worse, it's out there. So, i'm now learning it despite my own prejudice, and now an then mentally mumble, "oh, how stupid."

The stupidities seem to have more to do with preference, and by no means is it language specific. For example, calling an offset an index, leading to the 0/1 bugs that foil so many, camelCasing, and repeating context inside the name. I'm likely to do my own thing for my own code, to keep it enjoyable. I'm even tempted to declare all arrays with one extra element and just starting from 1. Though, some array methods start from 0 regardless, so, i may not be able to hold onto that fantasy for very long.

This is also my first language where i'm learning proper inheritance. One rule that i wondered about is, if class B is a subtype of class A, a variable of class A can refer to an instance of class B, but not vice-versa. I thought that was backwards because B is A plus other stuff. The box isn't bug enough! If anything, i thought, it should be exactly the opposite. A variable of type B should be able to point to an instance of type A, because it fits, though there may be some defaults required.

But now, i finally got to an explanation from the book, albeit about casting, "Casts in Java affect only the treatment of references; they never change the form of the actual object. This is an important rule to keep in mind. You never change the object pointed to by a reference by casting it; you change only the compiler's (or runtime system's) notion of it." Aha! The reason a variable of type A can hold an instance of type B is that from a usage standpoint, B has everything A has, so who cares about the rest. Conversely, a variable of type B cannot hold an instance of type A because it does not have everything required. To use MBTI terminology, Java is for Ps, i am a J. (I just wish they keep away from databases, which is clearly J territory.) I almost feel enlightened. And from Java, no less.

Now to continue reading. I've been successful int trying to do one chapter a(n office) day. Currently in chapter 6.

"Even if you're on the right track, you'll get run over if you just sit there." -- Will Rogers

Working...