tag:dreamwidth.org,2009-05-06:301081DarkoshiDarkoshiDarkoshi2022-05-24T06:17:40Ztag:dreamwidth.org,2009-05-06:301081:846211Unicode / UTF-82022-05-22T22:50:36Z2022-05-24T06:17:40Zpublic6From what I have determined, the Wordle "Share" function saves these Unicode characters:<br /><br /><a href="https://www.compart.com/en/unicode/U+2B1B">Black Square</a>: (U+2B1B)<br /><a href="https://www.compart.com/en/unicode/U+2B1C">White Square</a>: (U+2B1C)<br /><a href="https://www.compart.com/en/unicode/U+1F7E8">Yellow Square</a>: (U+1F7E8)<br /><a href="https://unicodeplus.com/U+1F7E9">Green Square</a>: (U+1F7E9)<br /><br />But when I look at the saved text in a Hex Editor, why does it instead show these values?<br /><br />Black Square: e2 ac 9b<br />White Square: e2 ac 9c<br />Yellow Square: f0 9f 9f a8<br />Green Square: f0 9f 9f a9<br /><br />The Hex Editor does indeed recognize those values as the above Unicode equivalents as it shows them in the side panel.<br /><br />So how does e2 ac 9c get converted to 2b 1b, etc?<br /><br />Never mind, I figured it out. It uses <a href="https://en.wikipedia.org/wiki/UTF-8">UTF-8</a> encoding.<br /><br />e2 ac 9b<br />-> (in binary) 1110 0010 . 1010 1100 . 1001 1011<br />-> (bracketing the parts that are constant) [1110] 0010 . [10]10 1100 . [10]01 1011<br />-> (stripping out the parts in brackets) 0010 1011 . 0001 1011<br />-> 2b 1b<br /><br />f0 9f 9f a8<br />-> 1111 0000 . 1001 1111 . 1001 1111 . 1010 1000<br />-> [1111 0]000 . [10]01 1111 . [10]01 1111 . [10]10 1000<br />-> (go right to left and add zeros as necessary on the left end to make it a full byte) 0000 0001 . 1111 0111 . 1110 1000<br />-> 01 f7 e8<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=846211" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:794433maybe the view is more than the one table...2021-02-03T05:57:36Z2021-02-03T06:35:13Zpublic0The reason why I'm still debugging code at 12:52am is that<br /><br />I've built a precarious sand castle in my mind <br />where each grain of sand is a method call or a variable value or some interaction <br />and if I stop now, the ocean waves will wash the sand castle away,<br />and I won't be able to get back to it again tomorrow<br />without having to build it up again from scratch<br /><br />and anyway, I'm closer now than ever before<br />at having reached the top of the castle,<br />so maybe just maybe <br />the jewel in the upper tower <br />will be mine<br />if I reach <br />a little bit<br />further<br /><br />.<br /><br />achievement reached!<br />the view is the table<br />but the 700 table is not the 701 view.<br />of course, of course!<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=794433" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:788998blankets of white2021-01-14T08:03:01Z2021-01-14T08:33:24Zpublic0A layer of fog persisted here past noon today. It felt quiet and muted and calm, like after a snowfall. <br /><br />An Austrian radio station mentioned a "Schneeflockdown". Schneeflocke is German for 'snowflake'. So Schneeflockdown is a cute bilingual way of saying "snowed in".<br /><br />.<br /><br />While debugging, I came across this comment in angular.js:<br /><br /> // Insanity Warning: scope depth-first traversal<br /> // yes, this code is a bit crazy, but it works and we have tests to prove it!<br /><br />(I didn't write down what version of the file we are using, so am not able to find it online right now.)<br /><br />This is the code that followed the comment. After that comment, I didn't bother trying to make sense of it. It wasn't related to what I was debugging anyway:<br /><pre>
if (!(next = ((current.$$watchersCount && current.$$childHead) ||
(current !== target && current.$$nextSibling)))) {
while (current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
}
} while ((current = next));</pre><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=788998" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:706791lunar missions2019-08-03T18:57:02Z2019-08-04T17:09:17Zpublic0While scrolling through these old newspaper images from the time of the first manned moon landing...<br /><a href="https://www.poynter.org/reporting-editing/2019/these-50-year-old-front-pages-show-how-apollo-11-captivated-the-country/">These 50-year-old front pages show how Apollo 11 captivated the country</a><br /><br />(There are some headlines about Ted Kennedy leaving the scene of a car crash on Chappaquiddick Island.)<br /><br />One also sees headlines mentioning <a href="https://en.wikipedia.org/wiki/Luna_15">Luna 15</a>. It was an unmanned Soviet craft designed to land on the moon and bring back lunar samples to Earth. It orbited the moon at the same time as Apollo 11 - I don't remember hearing about that before! (Space race, indeed.) After the American moonwalk had finished, it attempted a landing but crashed into the moon.<br /><br />Interesting to read:<br /><a href="http://blogs.discovermagazine.com/vintagespace/2019/07/04/luna-15-accompanied-apollo-11-to-the-moon/">Luna 15 Accompanied Apollo 11 to the Moon</a><br /><a href="https://www.rbth.com/history/330657-luna-15-secret-moonshot">Luna-15: Russia’s secret moonshot designed to beat Apollo 11</a><br /><br />The first article mentions 2 medals the Soviets gave to the Americans <i>"to leave on the Moon honoring two lost cosmonauts, Yuri Gagarin and Vladimir Komarov,"</i> but doesn't say whether the Americans actually took the medals to the moon. According to this article, they did:<br /><a href="https://www.britannica.com/story/what-have-we-left-on-the-moon">What Have We Left on the Moon?</a> (answer: half a million pounds of equipment, trash, and other items).<br /><br />Jodrell Bank Lovell Telescope records Luna 15 crash:<br />(there's not really much one can hear in the video, but it is still interesting.)<br /><a href="https://www.youtube.com/watch?v=MJthrJ5xpxk">https://www.youtube.com/watch?v=MJthrJ5xpxk</a><br /><br /><span style='white-space: nowrap;'><a href='https://gfish.dreamwidth.org/profile'><img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a><a href='https://gfish.dreamwidth.org/'><b>gfish</b></a></span> staged a Lego re-enactment of the Apollo 11 mission on <a href="https://twitter.com/ApolloLego">Twitter</a>:<br /><a href="https://gfish.dreamwidth.org/386990.html">https://gfish.dreamwidth.org/386990.html</a><br /><br />This is an interesting video about the computer on the lunar landing module, and the 1202 alarm that happened: <br /><a href="https://www.youtube.com/watch?v=z4cn93H6sM0">https://www.youtube.com/watch?v=z4cn93H6sM0</a><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=706791" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:705688something went terribly wrong song2019-07-31T05:01:46Z2019-07-31T05:03:24Zpublic2StackOverflow was down for a little while this afternoon.<br /><br /><a href="https://twitter.com/StackStatus">https://twitter.com/StackStatus</a><br /><br />One of the subsequent tweets had this charming song.<br /><br /><iframe width="560" height="315" src="https://www.youtube.com/embed/t3otBjVZzT0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="allowfullscreen"></iframe><br /><br /><i>Video title: Something Went Terribly Wrong<br />Posted by: Mediocre<br />URL: <a href="https://www.youtube.com/watch?v=t3otBjVZzT0">https://www.youtube.com/watch?v=t3otBjVZzT0</a><br />Date posted: Dec 30, 2014<br /></i><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=705688" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:699663orange turpentine2019-07-03T21:17:12Z2019-07-05T07:13:09Zpublic0Whew, is it hot outside. Upper 90s, but with the humidity and in the direct sun it feels like in the 100s.<br /><br />Qiao hired tree cutters to take care of the fallen tree as well as another dead tree that hadn't fallen. They finished it all, including grinding the stumps and removing the debris, in under 5 hours. It's a good thing they started early when it was still overcast and not as hot.<br /><br />I will need to do some more fence repair before I can let the dogs loose again. But it's too hot now; maybe this evening. Although the forecast says it will still be 90 degrees, feeling like 96, at 9pm.<br /><br />My mom is going to a free outdoor concert this evening. Phew. Hot, hot, hot.<br /><br />Apparently Fort Jackson doesn't do their annual 4th of July Torchlight Tattoo and Fireworks anymore*. I didn't go often... I'm not into patriotic stuff, but the cannon blasts and fireworks, and cheering for the states and territories in the union was fun. Except for the parts where I worried that the fireworks would misfire and hurt someone. <br /><br />I am still doing my work-work for the day. Learning to write JUnit tests, using Mockito. I feel somewhat ambivalent about their usefulness. In my experience, they only test what you already know works, and when they break it's not usually because the code got broken, but rather because the test code or test data became outdated.<br /><br />Qiao's back yard now smells like my mom's oil paints used to. Or rather, the turpentine she used to clean the paint off the brushes. I like the scent, knowing that it is only pine. <br /><br />I had a small set of oil paints when I was younger. And a small bottle of orange-scented turpentine. The orange didn't mask the turpentine smell at all; it just morphed it into a different strong overpowering and astringent scent.<br /><br />Oil paints didn't appeal to me much. Too long to dry. Too hard to clean. Too messy. Not very suited to my style of abstract art. Me, not talented enough to paint realistic images very well. Although one time I copy-painted a portrait of my mom and brother from two photographs, and it turned out fairly well.<br /><br />Turpentine smell makes me think of the Mediterranean too.<br /><br />Whaddya know: <a href="http://www.eco-house.com/shop/915-natural-orange-terpene-solvent/">orange terpene</a> is made from orange trees and can be used as a substitute for turpentine. But I still think that the one I had back then was orange-scented pine turpentine. One made from orange tree extracts would probably have smelled better, like one of those citrus-based cleaners.<br /><br />..<br /><br />*A web search shows that 2017's Torchlight Tattoo event <a href="https://www.thestate.com/news/local/article158857234.html">was cancelled</a> due to the year-long centennial celebration that finished up that year. 2018's event <a href="https://www.thestate.com/news/local/article213866489.html">was cancelled</a> due to the "Victory Week" celebration in June of that year. But nothing at all is mentioned anywhere about it this year, which seems odd to me, considering that per those pages, <i>"The Torchlight Tattoo is typically one of the most popular July Fourth events in the Midlands. Before last year, Fort Jackson hosted July Fourth celebrations each year in recent memory"</i>.<br />Per a family friend, Fort Jackson is not doing the July event at all anymore, instead having fireworks as part of their annual June celebration, the aforementioned "Victory Week".<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=699663" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:680601i am a teapot2019-02-28T06:23:17Z2019-02-28T06:23:17Zpublic0I was looking up an HTTP status code...<br /><a href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpStatus.html">https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpStatus.html</a><br /><br />and as I scrolled down that page, "I_AM_A_TEAPOT" scrolled by... wait, what?<br /><br />After finding the code I was looking for (NO_CONTENT or some such one), I went back to read what the Teapot status code was for.<br /><br /><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418">418 I'm a teapot</a><br /><blockquote>The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is a teapot. This error is a reference of Hyper Text Coffee Pot Control Protocol which was an April Fools' joke in 1998.</blockquote><br /><br /><a href="https://tools.ietf.org/html/rfc2324#section-2.3.2">Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)</a><br /><blockquote>Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.</blockquote><br /><br /><a href="https://www.gizmodo.com.au/2017/08/aussie-programmers-attempt-to-remove-joke-im-a-teapot-web-error-ends-up-making-it-official-instead/">Attempt To Remove Joke 'I'm A Teapot' Web Error Ends Up Making It Official Instead</a><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=680601" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:642932exiting Vim2018-08-08T03:28:31Z2018-08-08T03:28:31Zpublic0I got stuck in a Vim window yesterday while doing a Git merge after pulling updates. Git wanted me to provide a reason for the merge, which it had never asked for before while doing a merge.<br />I didn't want to enter a reason; at that point I just wanted to cancel the merge to figure out what had gone wrong. But I had to close the whole window as I couldn't figure out how to quit Vim.<br /><br />So today I happened to do a search on it, and was amused by these pages:<br /><br /><a href="https://code.likeagirl.io/help-i-was-using-git-to-commit-some-code-and-now-the-window-has-changed-and-i-dont-know-what-s-9348a27e145b?gi=365e88d910a7">How to exit vim in 5 simple steps.<br />OR: Help! I was using git to commit some code and now the window has changed and I don’t know what’s going on!</a><br /><br /><a href="https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/">Stack Overflow: Helping One Million Developers Exit Vim</a><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=642932" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:631309Oracle JDK download not working2018-03-24T07:11:28Z2018-03-24T19:12:50Zpublic0Trying to get the Android SDK to work, so I can root my phone. It requires Java, though it doesn't tell me what version.<br /><br />On the following Oracle JDK 8 page, when I click the radio button to accept the license agreement, and click any of the download links, I get the error "We're sorry, the page you requested was not found."<br /><br /><a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a><br /><br />I even tried the pages for the Java 9 and Java 10 JDKs. All of the download links get the same error. I tried with different browsers. I even logged in to the site, as is sometimes required for downloading older versions of the files. What is going on? Are the links working for anyone else? Is it a temporary outage? How can the world go on, if the JDK can't be downloaded anymore? Did everyone switch over to using non-Oracle JDKs? AAAAAHHHHH.<br /><br />Now I thought to search Twitter. It's not just me; other people are having the same problem:<br /><a href="https://twitter.com/search?q=oracle%20jdk&src=typd">https://twitter.com/search?q=oracle%20jdk&src=typd</a><br />Well, that's a relief, sort of. But is the world going to end?<br /><br />So I decided to try downloading <a href="http://openjdk.java.net/install/index.html">OpenJDK</a> instead. Apparently that's made by Oracle too. But why does the <a href="http://jdk.java.net/">main download page</a> say that JDK 9 and 10 are "ready for use", while JDK 8 (Updates???) are "early access"? Eh? At least I found a working download link there.<br /><br /><b>Update</b>, 2:21pm:<br />The Oracle downloads are working again now. An Oracle employee posted on this <a href="https://www.reddit.com/r/java/comments/86qhq9/is_oracles_java_sdk_download_site_broken_for_java/">reddit thread</a> that the temporary outage was resolved about an hour ago. That's the only semi-official notice I found about it. No mention of it on Oracle's twitter feed, even though I counted about 20 tweets directed at <span style='white-space: nowrap;'><a href='https://oracle.dreamwidth.org/profile'><img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a><a href='https://oracle.dreamwidth.org/'><b>oracle</b></a></span> about the problem. Based on the posts on twitter and elsewhere from people getting the 404s, the outage was from around midnight to 2pm (EDT).<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=631309" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:598559other things2017-06-04T07:10:51Z2017-08-19T21:23:52Zpublic5Still tweaking other things on my new cell phone too.<br /><br />I found out that one can remove the pages from these old family photo albums (and put them back together again). Which means that scanning the albums shouldn't be that difficult after all (as long as each page fits on the flatbed - one of the albums does just barely. The other one would require using my mom's larger scanner). Which means that's another thing I want to get done.<br /><br />Firefox addons; learn how to update them to use these new <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions">WebExtensions</a> APIs.<br />Which also shows me that my JavaScript knowledge is woefully out of date. It's changed a lot in 20 years.<br /><br />I've just installed 2 and a half years worth of Windows updates on one of Qiao's old Windows 7 desktop computers, which we haven't used in that long. Because it has iTunes on it, and I don't want to install iTunes on my laptop. But there are a couple of items I want to get, which are only available to download from iTunes. And of course, that meant I needed to install Windows updates too, right? I dunno. It seemed the thing to do even though it took all day. Makes me think I might even be able to get updates working again on my old laptop too, if I wanted to.<br /><a href="https://blogs.technet.microsoft.com/windowsitpro/2016/05/17/simplifying-updates-for-windows-7-and-8-1/">Simplifying updates for Windows 7 and 8.1</a> - a rollup for all updates through April 2016, with only one prerequisite that must be installed first.<br /><br />Researching family tree stuff. Old census records. Found out my great-great-grandmother had at least 10 children, and possibly 5 more that didn't survive.<br />Need to determine what kind of open-source program I should use for doing a family tree, so that the data can be exported/imported in a widely compatible format.<br /><br />Want to replace all the screws for the door lock strike-plates and hinges with 3-inch long screws. And replace some of the strike-plates with ones that take 4 screws instead of 2.<br /><br />I finally took down the rest of the xmas decorations and put the boxes away. My mom helped me take down the xmas tree a few weeks ago. She and Qiao are as bad as me - once I made my mind up to take them down, they both said "I think you should just leave them up", making me debate it internally all over again.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=598559" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:587685yes I got stuff done hurrah2017-03-20T04:48:54Z2017-03-20T05:04:47Zpublic0I got my taxes done.<br /><br />I made a pie with a <a href="https://www.sofellafoods.com/products/sofella-chocolate-pecan-filling-mix">chocolate filling</a>. It's somewhat gooey, not what I was expecting from the photo on the box. But it's actually good, even though it also tastes oddly like it contains grape syrup mixed in with the chocolate. Based on the ingredients list, I can't imagine why. It contains alkalized cocoa, and the link I posted before indicates that the non-alkalized sort is the kind that's more likely to taste "fruity".<br /><br />I also made some <a href="https://www.amazon.com/Dr-Oetker-1-01-353100-Goetterspeise-Waldmeister/dp/B005JOMI66">Waldmeister Goetterspeise</a> which is a German jello with a unique flavor not found in the U.S. My aunt used to make it for me as a kid (with vanilla sauce on top!), and I still like it. The flavor isn't as intense as I remembered though.<br /><br />I trimmed my hair a bit. It was tickling the back of my neck too much a few days ago. My torso gets itchy sometimes. When I scratch, the skin gets pinkish red, and small itchy bumps, widely scattered, appear. When I stop scratching, it goes away. I haven't figured out a cause. It's been happening for a few years now. (Of course, having written "torso" there, now a few spots on my arms and legs started itching.)<br /><br />I'm over my cold, but still have a lot of phlegm. That always used to be the one of the worst parts of a cold, the weeks and weeks of snot that would only slowly diminish back to normal levels. So I did neti today for the first time in possibly 5 years. I stopped using neti around then, after <a href="https://darkoshi.dreamwidth.org/336403.html">reading warnings</a> against doing neti with unsterile tap water. Well, I used tap water today, like I used to. Anything else is too much trouble. But after reading <a href="https://www.cdc.gov/parasites/naegleria/sinus-rinsing.html">the warnings</a> again, I may forgo the whole thing for another 5 years. <br /><br />I used LJSec to delete my old protected posts from LJ, as that was something that had been on my to-do list for a while. There may not be much point in having done it, but at least it is off my list now. First, I did another import of all entries & comments from LJ over to DW, as well as a few backups of both my LJ and DW (with LJArchive), to make sure I wouldn't lose anything. The only problem with LJArchive is that imported comments don't show up with the user's LJ name like it does on the Dreamwidth pages, but rather with a generic ext_#### ID. If I have time someday, I'd like to see if I can update the utility to fix that.<br /><br />A few weeks ago, I cancelled my Netflix subscription, as I was using it so rarely. Qiao has another Netflix account anyway, which I can use when I want to. He also has an Amazon Prime account for watching videos.<br /><br />Last week at work, I was able to find the cause of another problem, and fix it. Well, I probably fixed more than one problem, but the last one is the one I remember. It gives me such a rush, a good feeling, being able to discover what obscure thing is making the code not work right and how to fix it, when I still don't even understand what half of the rest of the code is meant to do. I was thinking, I've been working on this same general code base, though it has undergone many transfigurations, for the past 22 years. I could spend my whole *life* working on it, and I still wouldn't understand it all, especially because it is constantly being changed. That made me think for a moment that maybe I should leave this job, just so that *whole life* part wouldn't come true. Eh. But whatever, this code or some other code, what difference. Hmm. Coming up on the end of the quarter. Wonder if they will have layoffs.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=587685" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:587116lovely goose chase2017-03-14T03:49:51Z2017-03-14T03:49:51Zamused/relievedpublic0I finally figured out that the problem I've been debugging for the last 2 days, was only happening due to me having set a breakpoint in a certain place. One module was writing data to a cache. When another module tried to read the data, it wasn't found. The cache is configured with a "timeToLive" value of 180 seconds (which was unbeknownst to me before, but NOW I KNOW). My breakpoint was causing the data to expire before it could be read, which then caused other errors.<br /><br />It makes perfect sense now. Back when this problem started happening, it didn't make any sense at all. What I was testing had been working fine before, and then it started getting these strange unexpected errors for no discernible reason.<br /><br />The ironic part is that I had set the breakpoint in order to change some data on a database row, in order to force an error, as I was trying to test the module's error handling. But then, instead of getting the expected error, I started getting unexpected errors, even when I didn't change the row. At least all this did allow me to find and fix some other problems with the error handling.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=587116" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:584009optimism2017-02-28T23:50:17Z2017-02-28T23:50:17Zpublic0Apparently I'm much more of an optimist than I realize.<br /><br />I can't say how many times I find a problem in the code, fix it, and expect the fix to work fine, and there not to be any more major issues. Or at least, not until after I've verified the first fix. <br /><br />Not that I don't know that there might still be other problems, but just that early in the day, I seem to have unbounded *optimism*. The kind of feeling that makes me think, I can test this fix, and then go on to test that other fix my co-worker put in, and then successfully retest the scenario the BA was having problems with, and then maybe even have time to debug the other outstanding issue. Like, I seriously expected I might be able to do all of that today!<br /><br />It's not supposed to happen that in testing the first fix, I get totally unexpected results, and upon research determine that those results are due to stranded data from yesterday's failed tests, plus additional problems in the error handling logic, plus maybe the cursors needing extra conditions in them, plus who knows what else.<br /><br />Please, not another can of worms. I've got enough cans of worms already!<br /><br />*Optimism*, because this code was extensively tested in the past and was working pretty good back then. Even though I should be pessimistic due to all the issues we've already found, which have mainly been due to a large code refactoring project that was done last year.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=584009" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:550803bless2016-07-17T01:01:04Z2017-07-06T03:44:26Zpublic5I've been updating scripts for setting up a local debug/testing environment for work. <br /><br />I worked late on it last night. If I don't take extra time in my off hours to get it done, I'll never finish it, even though it is something that will make the rest of my tasks easier to finish, as well as helping out co-workers.<br /><br />This morning, after getting only 5 hours sleep because I woke up early, I just wanted to tweak a few things and test it out. I should be able to kick it off and let it run while I'm doing other things, then kick off a few more things, etc. It started out well. Except that Eclipse wasn't picking up the right default JRE, which for our environment isn't the same as the JDK version that we need to use for running Eclipse itself.<br /><br />It was unclear how to configure Eclipse's prefs and configuration files so that it would use my dynamically inserted JDK path. That took what, 5 hours to get working? Because of fascinating details about how all that works, which I'm too tired to describe now but maybe later elsewhere.<br /><br />Then I had to do more tweaking because some files need single backward slashes in the paths, and some files need double backward slashes... and good heavens it didn't like having a combination of forward and backward slashes either...<br /><br />Then I had to tweak it more, because in changing all those slashes in the paths, I accidentally also changed slashes that weren't in the paths. So I had to add logic to swap those back. At this point, even though that may seem convoluted, it's the simplest way to do it.<br /><br />REM ... undo the slash changes that weren't in the paths. Change the double slashes back to single slashes. <br />powershell -Command "(Get-Content '%EclipseDir%\org.eclipse.jdt.launching.prefs') -replace '<\\\\', '</' | Out-File -encoding ASCII '%EclipseDir%\org.eclipse.jdt.launching.prefs'<br /><br />I already inserted a "Sheesh!" to the end of the comment, and was debating adding "Please Lord let it work right this time" or perhaps, "Please Lord, bless this code..."<br />because you know, even if I don't believe in a Lord, it would probably amuse the next person who looks at the file.<br /><br />.<br /><br />and also thunderstorm and yapping dog and vegan grilled cheese sandwiches - Follow Your Heart has a new <a href="http://followyourheart.com/products/smoked-gouda/">Smoked Gouda</a> cheese which combines/melts well together with the Tofutti American cheese slices.<br /><br />and also being partly upset with myself for having wasted more than half my weekend on work work. and yet still wanting to continue on it.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=550803" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:515077Dampfnudelwetter2015-10-03T04:54:06Z2016-04-02T21:45:31Zpublic3I could have made brownies. I could have watched a movie. I could have washed the dishes.<br /><br />Instead I wanted to get this task I was working on for work, working. Because it was one of those coding/testing/figuring out/tweaking/trying again/failing/getting a little further/thinking of a new way of trying again/etc tasks that's hard to walk away from.<br />Now it's 11:30pm and is it working? NO!!!! The zipped files aren't working; the gzipped files aren't working; the compiled stylesheets don't seem to be making any difference; waaaaahhh! phooey!<br /><br />It keeps raining and raining and raining. It was a fine mist most of today.<br /><br />At the Little Oktoberfest in Munich, when I was a kid in weather like this, they sold Dampfnudeln (steamed dumplings) with a plum filling and vanilla sauce. I remember them as being so big. But they can't have been that big; I must have been small.<br /><br />And then I do a websearch and find out that the Little Oktoberfest was in July, not October, so the weather couldn't have been all that cold and damp. Though it was Germany, so yes it could.<br /><br />My aunt made green Wackelsalat with vanilla sauce.<br /><br />Now it's 12:30am, and at least one of the 3 things I wanted to verify were working, seems to be working, maybe. Yes! It does! Woo-ha!<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=515077" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:474966Fife tings2014-11-07T02:39:15Z2014-11-07T02:41:02Zpublic0<b>When you see this, take a minute and share five good things of your day with the world, uncut.</b><br /><br />1. I saw that raccoon again*!<br />2. It was mild, overcast, and breezy at lunchtime**, with that ambiance of being surrounded by familiar/benevolent forces of nature. The colors were pretty too.<br />3. I got to use <a href="http://en.wikipedia.org/wiki/De_Morgan%27s_laws">De Morgan's laws</a> on an actual*** practical problem!<br />4. I made it home from work before Qiao for a change, though only by a few minutes.<br />5. Tomorrow is Friday!<br /><br /><br />* Again, while leaving work after dusk. It was crossing the street from the other side, nearly to the center. I could see headlights coming up behind me, so I silently begged it to either finish crossing the street in front of me, or to run back to the other side. But it just stood there as if telling me to go on and get out of its way. So I drove on. I hope the other car didn't run it over.<br /><br />** I purposely walked by the area where the turkeys were yesterday, but then was so lost in thought that I forgot to even look up to see if they were still around.<br /><br />*** As in the negation of something like ((aaa >= bbb and aaa < ccc) or (ddd <= bbb and ddd > ccc)). But then I found a way to also simplify the original condition.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=474966" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:452910bah bah batch file2014-03-22T21:11:31Z2014-03-22T21:11:31Zpublic9Trying to figure out how to get the logic in a big Windows batch file to work right is about driving me crazy.<br /><br />I keep running up against walls for the things that ought to be *simple*.<br />Like echoing a variable value.<br />Like comparing a variable to another value.<br /><br />Sheeesh!<br /><br />Consider the following.<br />-----------------------<br /><br />for /f "tokens=1,2*" %%a in (tmp.txt) do (<br /><br />SET var1=%%a<br />SET var2=%%b<br />SET var3=%%c<br /><br />echo %%c xxx<br /><br />setlocal enableDelayedExpansion<br /><br />echo !var3!<br />echo "!var3!"<br />)<br />------------------------<br /><br />Why does the 1st ECHO statement display an output with the 'xxx' *before* and partially *overlaying* the value that was read from the file, like this???<br /> xxxIYUIYOIYI<br /><br />The 2nd ECHO statement displays the correct value. <br /><br />The 3rd ECHO statement displays the first double-quote character, then the correct variable value. But it doesn't display the 2nd double-quote character. WHY NOT??? How can I figure out if there are spaces on the end, if it doesn't let me display anything after it??<br /><br />Heaven forbid what I really want to do is like this:<br />IF "!var3:~19!" == " " call :someOtherFunction<br />or like this:<br />IF "!var3:~-2!" == " " call :someOtherFunction<br /><br /><br />How can I figure out why the If statements aren't working, if I can't even get a simple ECHO to work right?<br /><br />If I replace the double quote chars in the ECHO statement with some other chars, it still has the same problem.<br /><br />It doesn't help that I was up til 2am working on this batch file last night, and was only able to get 5.5 hours sleep. Due to waking up early and not being able to fall back asleep.<br />On top of having woken up 1.5 hours early yesterday morning.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=452910" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:441568umm, what? ...what?2014-01-15T05:08:24Z2014-01-15T05:08:51Zpublic0Yesterday I had to download <a href="http://activemq.apache.org/activemq-590-release.html">ActiveMQ</a> for work.<br /><br />I'm somewhat familiar with verifying the hashes of downloaded files, and have used a few different tools for doing that. The ActiveMQ page indicates that MD5 signatures can be used to verify the downloaded files. That sounded like the hashes that my tool could verify. But nowhere on the page did I see the actual MD5 values that one would compare against. <br /><br />The ActiveMQ page also indicates that PGP or GPG signatures could be used for verifying the files. Ok... I figured that maybe this was a good reason for me to finally try out PGP and see how it works.<br /><br />I read about the differences between PGP and GPG, and decided to try GPG. So I went to the <a href="http://www.gnupg.org/download/index.html">GnuPG download page</a>. But found that it only has the source code. Apparently the binary packages are only available on the mirrors. There's no mirror in the U.S. The Canada mirror site wasn't responding. So I looked at a few of the other mirrors.<br /><br />It seems the latest GnuPG 2.0 version is not available in a Windows version. Why not? I don't know, but after reading a bit, it sounded like the 1.4.* version should suffice for my needs.<br /><br />Versions 1.4.0 and older are available as zip files, while new versions up to 1.4.9 are exe files. Why no zips for the later versions? I'd prefer not having to install anything... And how would I verify these downloads? Where are the checksums for them?<br /><br />It was at this point that I decided to forgo verifying the downloaded ActiveMq files.<br />I had a fuzzy head type head-ache, by the way. Makes it harder to think.<br /><br />Based on this experience, I'm not surprised that the use of PGP encryption hasn't caught on all that much. It seems you have to be a developer to even figure out how to get it. Heck, the first answer on <a href="http://superuser.com/questions/435252/small-sized-gpg-command-line-tool-for-windows">this page</a> to the question "Where can I find a command-line version of GPG for Windows?" is "You could download it and compile it yourself".<br /><br />I subsequently found <a href="http://www.gpg4win.org/download.html">this Gpg4win download page</a> which has a small 4MB version and also lists the SHA1 checksums. Whenever I feel up to it, I may try that one out.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=441568" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:410682darkoshi @ 2013-06-29T00:50:002013-06-29T05:23:42Z2013-06-29T05:23:42Zpublic0This afternoon at work while I was looking at some code, I came across a section which included the exact same case statement twice in a row. The 2nd one was commented with "Extra code added for ..." (where ... was a project from a long time ago).<br /><br />After looking at it a few moments, the comment started to seem very funny to me.<br /><br />As a co-worker said one time when his screen flipped sideways for no apparent reason, it was the highlight of my day.<br /><br />Maybe you just had to be there.<br /><br />Oh. I also got fairly close up to some turkey vultures today while walking around the pond at lunchtime. One was sort of chasing another to shoo it away, like the geese do sometimes. The vultures have a rather elegant way of running.<br /><br />I need to go to bed. All I need to do is to click the Post button and shut down the computer. I can do it. I can. I can.<br /><br />sigh.<br /><br />nothing important to say, I guess.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=410682" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:398850darkoshi @ 2013-03-09T15:05:002013-03-09T20:16:24Z2013-03-09T20:16:24Zpublic0<span style='white-space: nowrap;'><a href='https://andrewducker.dreamwidth.org/profile'><img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a><a href='https://andrewducker.dreamwidth.org/'><b>andrewducker</b></a></span> posted this link a little while back, and it's ever-so-appropriate:<br /><br /><a href="http://martinvalasek.com/blog/pictures-from-a-developers-life">Pictures from a developer's life</a><br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=398850" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:389674Java Update settings Fail2013-01-17T21:09:17Z2013-01-20T19:45:22Zpublic0Based on an articles such as these, I've gone ahead and disabled Java in my browsers:<ul><br /><li><a href="http://www.huffingtonpost.com/2013/01/14/java-security-fix-oracle_n_2475004.html">Java Security Fix Issued By Oracle, Feds Maintain Warning To Users</a></li><br /><li><a href="http://bits.blogs.nytimes.com/2013/01/13/u-s-agency-warns-of-java-software-problem/?nl=todaysheadlines&emc=edit_th_20130114">Serious Flaw in Java Software Is Found, Then Patched</a></li><br /><li><a href="http://nakedsecurity.sophos.com/2012/08/30/how-turn-off-java-browser/">How to turn off Java on your browser - and why you should do it now</a></li></ul><br /><br />As it turns out, I had a fairly old version of Java on my machine, due to having turned off updates a couple of years ago. So I updated to the Java version with the latest patches (1.7.0_11) and turned updates back on. As I had disabled Java in the browsers, I decided to have Java to check for updates on a weekly rather than daily basis.<br /><br />The next day after I booting my computer, my ESET firewall notified me that Java Update Scheduler (jusched.exe) was attempting to access the internet. In order to track how often Java was checking for updates, I only gave it temporary permission and did not create a firewall rule for it yet. I also changed the Java settings to check monthly instead of weekly, to see if that would make a difference.<br /><br />Yet jusched.exe still attempts to access the internet every day! I'm not even clear why jusched.exe is accessing the internet. From what I understand, it is only a scheduler, and jucheck.exe is the program which should check for updates.<br /><br />In addition, the Java "Automatic Update Advanced Settings" dialog is quite odd. There isn't really a setting to control how often it checks for updates. There is only a setting to control how often you are *notified* of updates.<br /><br /><img src="http://www.darkoshi.com/img/2013/20130117_JavaControlPanel_UpdateSettings.gif"><br /><br />When you select "Weekly", it says, "Java will check every Sunday at 12:00AM and notify you within 7 days".<br /><br />When you select "Monthly", it says "Java will check weekly on Sunday and notify you within 30 days".<br /><br />Regardless if you select weekly or monthly, it claims that it will check weekly. Furthermore, what is the point of checking for updates but then waiting 7 or 30 days to notify you that updates are available? I would expect a program to notify me of available updates right after it has checked and found them. I want to control how often it checks for them, not how long it waits to tell me about them after it finds them.<br /><br />I believe that this is why I turned off updates 2 years ago - it annoys me the settings dialog claims that it will check weekly when in fact it checks daily, and that I can't control how often it checks for updates. <br /><br /><a href="http://www.howtogeek.com/howto/windows-vista/what-is-juschedexe-and-why-is-it-running/">This page</a> explains how to set up your own task in Windows Task Scheduler to check for updates, rather than using the Java Update Scheduler. But each time this task runs, you'll get at least 1 popup window which you'll have to close, even when no updates are available.<br /><br />I feel that one shouldn't have to go through that much trouble... I'm feeling rather disappointed by Java, which is a shame as it is currently my preferred programming language.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=389674" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:346112add-on updated again2012-01-23T03:52:02Z2012-01-23T13:47:07Zpublic24I made another update to my <a href="https://addons.mozilla.org/en-US/firefox/addon/toggledocumentcolors-198916/">ToggleDocumentColors</a> add-on today (version 1.4.20120122), for a bug related to the one I worked on yesterday.<br /><br />According to the add-on's <a href="https://addons.mozilla.org/en-US/firefox/addon/toggledocumentcolors-198916/statistics/">Statistics Dashboard</a>, it currently has over 200 daily users.<br /><br />..<br /><br />If you are a user of the add-on, and want to report any bugs, feel free to reply to this post.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=346112" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:345843bug fixing2012-01-22T09:35:08Z2012-01-22T09:35:08Zpublic0I fixed a bug in my Firefox add-on today. It was trickier to fix than I had expected. It seems that you get a new instance of the add-on object for each browser window that is opened. In any case, the event observers that you set up in the add-on code get called for each window, so any logic which is in the observe() function may end up getting executed multiple times for a single event.<br /><br />When I try to understand some code examples, I feel like I don't know much JavaScript at all. Javascript seemed much simpler when I first learned it. Now it seems full of syntax that I'm not familiar with. Some day I hope to understand <a href="http://www.softwareishard.com/blog/planet-mozilla/firefox-extensions-global-namespace-pollution/">this kind of stuff</a>.<br /><br />The only simple way I could think of dealing with my add-on's problem, was to write out a user preference value and use it like a global variable which all instances of the add-on could check, to determine whether or not to execute the code in the observe() function.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=345843" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:322508SeaMonkey - adding button to navigation toolbar2011-09-26T05:05:30Z2011-09-26T05:05:30Zpublic0I've been updating my Firefox/SeaMonkey add-on.<br /><br />One thing I wanted, was for the add-on to automatically add the "Toggle Colors" button to the navigation toolbar when the add-on is installed, so that the user doesn't have to manually do it.<br /><br />I was using the code from this page:<br /> <a href="https://developer.mozilla.org/en/Code_snippets/Toolbar">https://developer.mozilla.org/en/Code_snippets/Toolbar</a><br /><br />It worked on Firefox, but not on SeaMonkey.<br /><br />The code on that page has a condition to avoid adding the button, if it is already there.<br />For Firefox, document.getElementById(id) returns null when the button isn't on the toolbar yet. But for SeaMonkey, it isn't null... the button is already in the document, but not on the toolbar. The button is on "BrowserToolbarPallette", which apparently is in the document for SeaMonkey, but not for Firefox.<br /><br />I updated the code as follows, so that it would work for both Firefox and SeaMonkey.<br />Instead of using this condition at the start of the function:<pre>
if (!document.getElementById(id)) </pre><br />I had to use this:<pre>
var button;
button = document.getElementById(id);
if (!button ||
button.parentNode.id == "BrowserToolbarPalette") // need this for SeaMonkey
{
...
}</pre><br />I also had to slightly change the code to remove the "let" keyword, which didn't work in my browser.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=322508" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> commentstag:dreamwidth.org,2009-05-06:301081:14585coding peeve2011-05-30T07:38:31Z2011-05-30T07:56:45Zpublic1My company is working with another company to get one of their large COBOL applications translated into java. The other company doesn't think that including white-space in the code for legibility is important. Apparently the people on my side don't think it's that important either, as we surely could have requested it be done anyway, and how difficult could it be to add spaces and line-breaks?<br /><br />So a lot of the translated code that we're getting looks like this:<br /><span class="cut-wrapper"><span style="display: none;" id="span-cuttag___1" class="cuttag"></span><b class="cut-open">( </b><b class="cut-text"><a href="https://darkoshi.dreamwidth.org/14585.html#cutid1">cut due to width</a></b><b class="cut-close"> )</b></span><div style="display: none;" id="div-cuttag___1" aria-live="assertive"></div><br />This peeves me.<br /><br />A lot of our programmers are new to Java. So when they start working on the code and updating it, they will likely mimic the above formatting, possibly not even realizing that it's possible or preferable to put in whitespace and linebreaks.<br /><br /><img src="https://www.dreamwidth.org/tools/commentcount?user=darkoshi&ditemid=14585" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/> comments