Category Archives: Uncategorized

A Visit from Saint Nicholas: “Twas The Night Before Christmas”

Great poem! Originally called “A Visit from St. Nicholas“. I still remember singing a version of it in a grade school choir.

Doesn’t he sound like the late Mitch Hedberg? The diction and phrasing.

History of Christmas:

When I was in Italy I visited the tomb of the real Saint Nicholas at the Basilica di San Nicola in Bari, Italy.

Merry X-Mas and whatever good and moral stuff you celebrate!

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Sonos unable to add folder due to Kapersky firewall

On laptop I tried to add a local folder on C drive to Sonos. The Sonos controller on the same laptop gave the 1002 error code. This is a timeout?

Tried to find solution on web. Firewall had no issues and anti virus software wasn’t doing anything strange. Just in case, I turned off file scanning. Still have issue. Turned off the Windows firewall; still have problem.

Long story short, Kapersky has a firewall running, doh! Turned that off, Sonos can read local folder. Makes no sense. Why would a firewall block a local app from local folder? Probably because the local Sonos controller has to update the local network with that folder so that other controllers in house can also use it.

Links
Sonos support page on error code 1002

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Large-world networks and species, social, and internet collapse

A Small-World Network is found in many naturally and and artificial situations. At the other extreme, if a network is totally connected, a complete digraph? You get zero information. This can be translated into species collapse, zero advertising revenue, and others such as ineffectual internet search.

Can this happen? In animal populations a fully connected graph is when everyone is closely related. The gene pool is stagnant. That population dies. In the internet, it could happen if everyone is on FaceBook and knows everyone else, or they are on Twitter, and follows everyone else. Another example, in the Mathematical field, a complete graph would mean that everyone would have an Erdős number of 1.

Is there a graph measure that correlates to the above? The more connected the less information, an Entropy?

Information loss, heat death. Time for another Big Bang.

Updates

  • October 3, 2015: Continuing the above line of thought, perfect order leads to zero information.
  • October 5, 2015: A Zombie Apocalypse is just a food network that is maximally connected, your next meal is sitting right next to you.

Links

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

How to easily siphon water from pool cover

Time to open up the pool. This time I’ll use my brain and figure out how to do this better.

Yucky Method
The cheapest way to do this is by getting a short length of hose, putting one end in the pool, the other in your mouth and getting the air out. Once that is done, if you take the end and lower it below the other end in the pool, the laws of physics take over, and planet will try to make the two ends of the hose have the same water pressure. Thus, the water starts draining out.

But, that is yucky. You have to really put your arms in that dirty water, and you may get some of it when you suck out the air. I see little wiggly worms in there.

The inexpensive plastic pump method
My new neighbor lent me a plastic pump, that you press plunger a few times and it starts a flow between two short narrow hoses that are attached. Search web for “hand pump to drain water”. I didn’t know there were inexpensive things like this so went thru the experiments below. Apparently, these pumps are used in garages, boats and stuff.

Note there are really very cheap plastic pumps that require you squeeze a small plastic piece with one hand to get the flow going. That one doesn’t work. The one that worked for me was more like a piston, like a bicycle tire pump. Very small, about fourteen dollars. The hoses on each end are also plastic and very narrow. Takes a loooooong time to empty the top of pool. Sometimes it stops flowing and you have to start the flow again.

My Method #1
Method #2 below, is better. Get one of those large plastic water jugs. Like the ones used in water dispensers.

pool-siphon

  1. Put a hole in the cap so that you can push the hose thru.
  2. Fill the jug with water.
  3. Put the cover back on the jug.
  4. Now one end of the hose is in the jug. Take the other end and stick it in the pool.
  5. Carefully, move the jug closer to the pool and upend the jug.
  6. Water will start draining from the jug into the pool. This will remove the air in the hose!
  7. Pull the hose in the jug so that it is bottom of jug. This will allow you to flip the jug over again and prevent air to get into the hose.
  8. Bring the jug below the height of the other end in the water.
  9. Now when you flip the jug over, the pool water will be draining out.

Writing down the steps makes it seem complicated. All your trying to do is remove the air from the old hose your using to siphon out the water. It’s just like that motor gas siphoning technique.

My Method #2
I have another idea. This is much simpler. Have not tried it yet. [update: it works!]

  • Get a hose and cut it so that you can put one end in the water on top of pool cover, and the other end long enough to hang below the desired water level.
  • Now get rubber stopper plugs that fit each end of hose airtight. I got a set at the local hardware store.
  • At a faucet fill the hose with water and close in that water with the two end caps.
  • Now put one end in the pool and the end other outside the pool, hanging below the desired water level.
  • Remove the end plug that is outside of pool, and then the plug at the other end inside pool.
  • When you remove the caps, the water should start emptying.

    An even better better way?
    This video shows an alternative method. I didn’t try this, but the video shows it working. If you have a long enough hose, you can connect put that hose in the pool. Turn on the water. When all the bubbles have stopped coming from the end in the pool, turn off the faucet. Disconnect end of the hose at the faucet side. If the height of the pool is higher than the final end of the hose you should start getting water draining from the pool.

    Or you can buy a pump. I once bought a cheap pump and it didn’t last one day of use.

    Links

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Do tablets have a black screen of death problem?

    Just happened to my tablet, a Samsung Tab Pro 10.1. If you search online for this you find many discussions and pleas for help. Does this happen to other brands of laptops?

    BTW, there is also a White Screen of Death associated with iPod, iPad, or iPhone.

    On restart, the screen would not show. Sound is ok, buttons seem functional. A restart or reset using button combinations did not fix this.

    The Fix
    Luckily I found some instructions on how to fix this. Remove the back cover, disconnect the LCD cable, wait for a few minutes, then reconnect.

    Note: Now my WI-FI level is very low. Yikes! I took it apart to see if there is some kind of antenna connection to the case or cover. Don’t see anything. waaaaaa. (;゚︵゚;)

    Update: June 18, 2015 – Changed the channel my wi-fi router was using. Fixed! But, now if I hold the tablet at edge, get low WI-FI level. Arrrrr. >:(

     

    One person wrote Galaxy Tablet Reboot Trick. Too bad I did not try that first.

    Notes

    1. Doing this may void your warranty.
    2. Don’t use a metal device to pry the back cover off. Get a plastic prying device that are sold in kits for this kind of thing. Or use a guitar pick.
    3. Getting the cover off takes a lot of careful prying.
    4. Some people recommend you disconnect the battery connector before you disconnect the LCD connector.
    5. Getting the cover back on is just as hard. I still don’t have it seating well.

    Background
    Note that all (?) electronic components that have multiple connected parts will have issues. When I worked with metrology components or Electrochemical control devices, sometimes the only thing that would fix them was to disconnect and reconnect some device or subsystem, wait a while, then turn the unit back on. I just read that this is one technique to ‘fix’ ECU units on some automobiles.

    Links

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    maven-tomcat7-plugin not extracting the war file

    The Apache Tomcat Maven Plugin has a great feature: it can create a runnable jar file with an embedded Tomcat server.

    I tried this on a simple ‘Hello world!’ webapp to see if this works. It didn’t. When you run the jar: java -jar target\hello.jar, it would fail saying that the hello.war could not be found.

    Of course I tried many different configurations and Maven POM file changes. Web searches did not point to an issue. Finally at the end I found something. There is a bug in the plug-in version 2.2. Errrrr.

    Anyway, here is a suggestion to get around it. Made the changes, it works.

    Links

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    FORTH language processor on comet

    The Philae spacecraft that landed on Comet 67P/Churyumov–Gerasimenko (67P) had an experiment on board that was driven by a FORTH language processor, the Intersil HS-RTX2010RH.

    The experiment/hardware was the The Surface Electric Sounding and Acoustic Monitoring Experiment (SESAME).

    The Forth language
    Forth is a stack-based language. Interestingly PostScript is similar: http://en.wikipedia.org/wiki/PostScript#The_language

    Historical minutia
    Forth gave rise to this bumper sticker: FORTH ♡ IF HONK THEN

    What is being used in more recent space missions?
    A lot of custom FPGAs and processors like the RAD750. See for example: A HIGH PERFORMANCE COMMAND AND DATA HANDLING SYSTEM FOR NASA’S LUNAR RECONNAISSANCE ORBITER and The New Horizons Spacecraft.

    Updates
    Sep 5, 2016: The final resting place of lander was found
    Feb 14, 2016: UNDERSTANDING PHILAE’S WAKE-UP: BEHIND THE SCENES WITH THE PHILAE TEAM
    Jan 26, 2016: Philae lander fails to respond to last-ditch efforts to wake it
    June 14, 2015: ROSETTA’S LANDER PHILAE WAKES UP FROM HIBERNATION
    November 26, 2014: Turns out the RTX2010 is used extensively on this mission. It has ten of them and one pair controlled the flight.

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Continuous testing with Infinitest

    With Infinitest every time you make a change in your code, the JUnit tests will be executed. How cool is that? Infinitest will run in IntelliJ or Eclipse.

    I wrote a more generic post on CT that forks this post: Continuous Testing while developing, CDT?.

    I tried it in a very small Groovy project, and it worked. Of course, Groovy compiles to Java, but in an IDE things get complicated.

    Unfortunately on a large Java project it did not seem to work, and the web site does not have enough information to determine what the issue is. For example, the status line is showing that it is running a test (unrelated to the recently changed code) and it shows “(400 remaining)”, remaining what?

    Whether this plug-in works does not negate the concept of Continuous Testing as discussed below.

    Installation
    I installed the plugin using the update site. Made no configuration changes. Then I changed my code, and nothing happened, just a status at the bottom that one test case ran. In fact, I changed the Unit test code to force a failure.

    Then I noticed that Eclipse’ Problems view had red ‘x’. Hmmm, I didn’t make any compile related changes. Opening the Problems view showed the actual test failure. Ah, now I get it. The status bar is just like the JUnit status, red or green.

    Workflow
    I thought the plugin would reuse the JUnit view in Eclipse. It doesn’t, instead it adds any failures to the Problems view. Thinking about it, that is the correct approach. When your coding the only distraction you need is to know if a change to code broke something, comparable to a compile just getting compile errors.

    Bringing up a new view, especially the JUnit view would be heavy weight. When you focus on testing then the full JUnit view is more useful. But maybe this should be a configuration choice?

    Anyway, the workflow is just code as usual. The status message at bottom of the IDE will be Green or Red depending on the test run. When red, the Problems view will show the test failure. Unfortunately clicking on the error line will not bring you to the failing test, but this could be that this is a Groovy Project.

    Continuous Testing
    We don’t edit code then invoke a compile step anymore. Our IDEs do that automatically. Then why have to invoke our unit tests manually? This “Continuous Testing” (CT) approach enables a smoother Test-Driven Development (TDD), maintenance, or refactoring, work flow.

    Is there any evidence of this? Some papers on CT are found here.

    If you search for the term ‘continuous testing’ there is not much. Usually it appears in the context of Continuous Integration servers. Perhaps its time to make CT more visible so that it’s more available as a development practice.

    Great videos on the CT as implemented in Mighty-Moose, a product for Microsoft Visual Studio, are found at continuoustests.
    Mighty Moose Demo, a CT product for Visual-Studio.

    Cons?
    Mentioning this to any developer will give you immediate “buts”: But my tests take too long; it would be distracting; I change code constantly;…… I sometimes think developers are driven by a little motor in them, but … but … but … buuuut.

    The only thing I see in Infinitest to address these concerns is the use of a filters configuration file. You can add multiple regex to avoid tests that you don’t want to run all the time.

    I’d like the opposite too. The ability to easily define what I am interested in testing, inclusion filters. On a large code base you may be concentrating on a few packages, so it should be easy to just add those to a filter without having to drag out the “Mastering Regular Expressions” book.

    Alternatives?
    Though Infinitest is good, why isn’t running a configuration on configured type of changes supported in Eclipse? Is there is a direct way to invoke the JUnit plugin via adding a new custom “builder” to Eclipse? A builder in Eclipse is triggered by resource changes. So, on source code change this builder would have to run an associated ‘JUnit run configuration’.

    Update
    May 1, 2014: While looking at the Infinitest source I noticed they use AssertJ. Another great library. So many cool things. So why is code bug ridden? Just joking.
    May 6, 2014: Tried Infinitest in a larger project. Did not work.

    Tested on
    Eclipse Kepler Service Release 2
    Groovy Plugin 2.9.0
    Groovy compiler 2.2
    Infinitest 5.1.110
    Windows 7

    Links

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Roadways as linear induction power generators

    Take every roadway in a country, embed a series of electromagnetic coils, now put a magnet on the bottom of every vehicle, result is electrical generation. This idea came up during the morning shower. Can’t embellish, late for work!

    Back home ….

    Turns out reuse of roadways to harvest energy is an ongoing research and in some places experiments. So far a web search shows that piezoelectrical and thermoelectrical are widely sited as technologies to use. I have not seen the use of linear inductors mentioned. Perhaps there are serious engineering reasons, maybe they could even cause even more energy waste.

    Some commentators on various news sites state that these systems are more like bogus perpetual motion machines, in that the vehicles will have to expend energy on the road energy generators, so there is no gain. I think that is nonsense since the vehicle will expend waste energy in many different ways, they are already deflecting the road surface, causing wind energy, and so forth. But, I don’t know the field.

    Resources

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Work on ‘Common Event Expression’ stopped

    MITRE has stopped all work on CEE — http://cee.mitre.org/.

    MITRE is willing to pass this effort forward, and allowing further development:

    “MITRE is open to transition opportunities for CEE — including transferring all CEE specifications, documents, source materials, etc.; transferring all CEE-related intellectual property rights; and pointing this website to a new hosting location — to an organization, group, or individual willing to continue logging standards development in a philosophy similar that of the CEE community.”

    The Logging Problem
    Updates:
    12/19/2014: Just learned that the general term for these kinds of efforts is Structured Logging.

    If you look at the efforts for a logging or event standard, you’ll find many. This is both good and bad. Perhaps, this effort really belongs in an Open Source initiative?

    In this paper, the problem is outlined and past efforts are discussed. The list of past efforts are:

    • CEE (now)
    • CBE
    • CEF
    • CIDF
    • IDMEF
    • SDEE
    • WELF
    • XDAS

    A good analysis of the event formats is given by the authors Jörg Becker, et al [1]

    Further reading

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.