Whose fault is it anyway

I guess I never really believed that a lot of the news organizations were being overtly “liberal” with an agenda.  It seemed to me that any individual writer(s) may have a personal opinion and that is perhaps why he wrote the article

i.e.

“Clubbing baby seals now seen as cruel”

I have had about 24 or so days to listen to or hear about how the US government shutdown is the fault of the president from one group of the media while hearing that it is not from another group.  I actually think there may be enough blame to go around so here is my chance to offer my impartial view.

President Trump

Could the shutdown be the president’s fault? The easiest person to blame about this is the president.  He doesn’t make it easy to give him any benefit of the doubt when he says things like.

Dec 21, 2018

I am proud to shut down the government for border security

I will take the mantle of shutting down. And I’m going to shut it down for border security.

In one sense you could say that it is refreshing that he is willing to stand up for what he believes.  You could also imagine that this is a pretty unrealistic desire. President Trump was unable to get wall funding approved when he had a majority in both the house and the Senate.  How did he imagine it would work with the house of representatives expected to be counter to a lot of his ideas.

Republicans

Could the shutdown be the Republicans fault?  The Republicans in both the house and the Senate did agree in Dec 2018 on a stop gap bill to keep the government open. This was not approved by the president which was the start of this shutdown.  However, a very similar bill has been approved in 2019 by the house of representatives but it has not even been brought to the Senate floor for a vote.  (naughty naughty Senate Majority Leader Mitch McConnell)

Democrats

Could the shutdown be the Democrat’s fault? It is possible to suggest that the Democrats are at fault over this budget impasse. They just got into power and perhaps are kicking up their heels to prevent the “good works” of the president. After all the difference between that money that President Trump wants (5.7Billion) and the total budget of the US government (3.422 Trillion in 2018) is, in essence, a rounding error of 0.16%. They did try and submit the same stop gap bill as in Dec 2018 to the Senate where it didn’t really go anywhere.

How did this start exactly?

The Congress did not actually manage to create a budget for the government by the Oct, which is the beginning of the fiscal year.  In order to keep the government running, they did manage to pass a continuing resolution to fund the US government, but this temporary resolution was not passed by “The Donald”.

Congress

Is it the fault of the congressional branch of the US government?  This is also a very strong possibility.  The taking the busiest of congressional years, 2007, the number of days spent working was 190 which does compare pretty favorably to the number of working days for the average US worker (260).

Don’t misunderstand it is not that I am jealous (I am) as they work less[1] and earn more money than most people.  The reason why this might be a congressional problem is that the budget is late but more importantly it isn’t a proper budget.  Not only that but in the last 48 years which covers a lot of republican and democratic majorities there have only been four budgets that have been in surplus (1998-2001)[4]. A budget deficit in a family budget can occur but usually only for a short time and never for an entire year.  This means that most members of Congress have not really done their job for decades.

Well, I imagine that these men and women of Congress, nay public servants, are actually barely able to make ends meet.  Perhaps they are all overworked with second and third jobs just to pay their bills[2]?  This also does not seem to be the case.  These public servants not only can pay the bills but they are accumulating enough wealth that they may actually disprove the classless society in the united states.

No, those tireless public servants have not been spending their free time thinking of how to balance the budget but have instead spent their time funding raising[3].  The amount of time spent fundraising is mind-blowing.  It seems to me that whether or not Congress is to blame for the current US government shutdown is a bit of a moot point as they have been complicit for nearly 5 decades of poor fiscal management.

You and I the voter

Is it possible that the reason the US government is shut down is the fault of you or me?  I would say that unfortunately the American voters have also been complicit in these problems.  This is not immediately connectable with shutdown but in the permissive attitude that they have supported, nay, encouraged in their representatives.

All of these are important

Strong defense
Protect the weak
Clean water
Safe food
Clean air
Global warming
Anti-discrimination
Strong borders
Nation of laws
Equal protection under the law
1st amendment rights
Right to bear arms

You may not agree with all of these but if we the voter do not look at the bigger picture when we elect a congressman then we are with 100% certainty responsible for this shutdown and the next.

A workaround

It is still possible for both houses of Congress to pass a common bill with 2/3 vote of both houses.  This would override any possible presidential veto and would get the government running again.  Once that is done then having real fact-based discussions on the wall or other ideas for a better and stronger America would be good.

There is enough fault to pass around.  Rather than trying to assign blame lets work in a non-partisan fashion and get things done.

 

[1] https://www.thoughtco.com/average-number-of-legislative-days-3368250
[2] https://bigthink.com/news/heres-how-much-senators-and-congress-members-are-worth-compared-with-us-common-people-surprised
[3] https://www.termlimits.com/congress-fundraising-priority/
[4] https://www.thoughtco.com/history-of-us-federal-budget-deficit-3321439

Posted in Soapbox | Leave a comment

Tips for Overwatch

Overwatch is a first person shooter made by Blizzerd Entertainment. you have 29 charecters that you can play as.

 

Name Tip
McCree Use his Flashbang if somebody else wants to use their Ultimate.
Tracer Only use her Ultimate if it can stick to somebody. Otherwise it will kill you.
Bastion Best playd when you have to escort a payload.
Ashe Use BOB when the other Team wants to take the Point.
Reinhard Make sure that no shield of either the enemies Reinhard , Zarya or Orisa
Ana Use if somebody wants to do their Ultimate use her sleep dart and wait 30 seconds. Then their Ultimate will be done.
Orisa If Roadhog tries to hook you use your invincibility.
 Mercy If you want to revive somebody always wait until your Orisa places a berrier infront of you.
Torbjörn You can shoot your Ultimate very far.
Hanzo  Shoot your Ultimates into large crowds.

 

Posted in Gaming | 4 Comments

Just making it – a new cube

Some time back, I had a fair amount lot of free time.  I spent the time working with a friend in the evenings to create my own LED cube from scratch.  It was actually quite a bit of fun, the electronics was not overly complicated with most of it being done by a raspberry pi. It was fun to see both the hardware and the software side by side.

4-4-4-cube

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

However, I am not an electronic engineer and I had to make some decisions which limited the overall solution.  Part of this was the solution was pretty slow and the LEDs were actually not overly bright.  The cube looks good in a dark room but you cannot hardly see it in normal lighting conditions.

I was also a bit disappointed in exactly how my cube wasn’t completely symmetrical.  Not bad for an amateur but I was hoping for better.  This time I was going to try my hand at building someone else’s kit.

Building the cube

The most challenging part is to actually build a LED cube.  Keeping the spacing consistent and soldering internal connections of each plane makes building the cube an intricate 3D puzzle.

The plan to create a very symmetrical cube was to build a template to assist in building the layers. The idea is that if each layer is built identically the chances are better that all the LEDS will line up for the rows and columns.

There are two different directions to go, either to build each horizontal layer or to build a vertical layer.  In my previous cube I learned the hard way that it is really pretty difficult to assemble these horizontal levels. This was while trying to make 4 internal connections that were not accessible from the edge.  Building a larger cube will have considerably more internal connections, in the case of a 8x8x8 cube this would be 49.

My mentor Mikhail suggested that it would be much easier if I used a vertical slices.  He suggested it might make the assembly easier.  I have seen other examples on youtube assembling either as slices or even just adding each column as it is completed.

 

First attempt

The first step was to try and build the template to create each vertical slice.

form-template-3The template looks pretty good in this picture but unfortunately looks can be deceiving. The actual LED’s are not perfectly aligned but more importantly the groves are not all straight, some of them angle slightly.  This makes it quite difficult when trying to get the layer off of the template.

I tried to create a few small “slices” using this template but discovered that the defects, mainly the groves for the vertical lines, make using this template infeasible.

 

Second Attempt

I still wanted to build the cube in slices but I needed some assistance to create a more perfect template.  This would be easier if I had better wood working tools and wood working skills so I thought perhaps I could purchase some parts that could allow me to create a consistent template.

I started with small wooden blocks that already had a hole drilled through them.  Despite how similar they appear in your hand they are not truly identical.  My solution was to get a long straight wire to help ensure that they are all nicely aligned. It is not obvious but after all the blocks were glued down I had to add glue around each block to help make each block more secure.

This template for building a panel does not use the legs of the LED’s hardly at all.

 

Third Attempt

My third and final attempt was to to build the cube in an entirely different way.

Of course once you create a lot of rows like this, you need another template in order to assemble them into a panel.

In retrospect this should be intuitively easier to assemble a cube from panels.  The problem with building and assembling each layer is that it is necessary to connect up all of the “columns” with a led. In the case of a 8x8x8 cube this is the task of attaching 64 columns on each layer.  The wires for each column would of course be standing straight up which means you need to carefully get your soldering iron to each spot without really bending these wires.

Most of the complexity This problem goes away when assembling the cube as a series of side panels.  Of course you still do need to connect the different panels together.  This task is much simpler as it is no longer necessary to have eight wires connecting each panel together at each layer.  One wire is enough.  This reduces the number of wires that need to be added to hold everything together from 64 to 8.  I actually used a few more than that to give the cube some extra stability.

 

Another twist

I did play around with this alternative method as well.  During my research I saw another cube developer who created a small loop at the end of each leg and then fed the row or column wire through this loop and then soldered it.

This other maker was creating a much more complicated RGB cube and needed to use this method, but it was really convenient in my case as it allowed me to create a very simple cube with clean lines.

In the end, I used both this small loop along with my third attempt at building a template form.

 

Wire preparation

The template itself actually does quite a bit of the work, it keeps the LED’s separated and at the proper distance from each other.  The only tricky part is that you need straight wire for the rows and columns but the wire tends to be purchased in spools.

How to straighten wire was described in how I built my first cube so I won’t elaborate on it much here.  I will however give some links to all three methods for doing this.

  1. Pull the wire slightly [1]
  2. Use a drill through a board [2] or with a vice [3]
  3. Straighten between a couple of boards or [4]
  4. A pair of pliers

In theory any of these methods will work to a certain degree.  I never did try the drill method but in the end I decided for the final method.  If the wire that you are using for the structure of the cube is reasonably thin it is possible to simply pull the wire a small bit with a pair of pliers just using your hands.  You cannot straighten wires that are very long but with this method I could straighten a piece that would later be cut into three smaller ones that are each long enough for a 8x8x8 cube.

I did cheat a bit as I used a vice grip pliers and a pair of pliers.

Other preparation

Actually there is not a lot of other preparation but it is a good idea to test your LED’s before assembly.  This step is more important if you are building a cube from scratch because you will most likely have a lot of LED’s available.  This step is important if you have a kit yet if one of the LED’s is substantially dimmer or doesn’t work you might find it difficult to get a replacement.

 

3D LightSquared DIY Kit 8x8x8 3mm LED Cube

I looked at a couple of sources for LED cubes on the internet.  I could have purchased one on amazon but they were a bit more expensive than I was willing to spend for testing out someone else’s cube.

I found an 8x8x8 cube kit on Ebay for a very attractive price, so I gave it a try. I was a bit unhappy to see that I received a kit but no actual instructions were delivered.  I went to the internet to see if I could find anything that would help me.

I did find plenty of pictures in the google search engine looking for my kit but perhaps one of the most helpful things was the following video and instructions that I found at the instructables.com site

I also saw some good photos from the hackaday.io site.  You do have to be careful when putting in some parts such as the resister network and make sure that the capacitors are put with the correct polarity.

Actually putting the board together is really very simple with one little exception.  The kit contains a whole set of “round pin needles” which you remove the insulation from and solder into the board. It is really a very clever way of connecting the LED panels to the board but it is an entirely irritating way thing to actually solder.  No matter how I tried to solder these it it seemed that when I rotated the board that I soldered them in at a slight angle in one direction or another.

In the end this wasn’t quite the problem that I had initially thought as I choose a completely different method of building my panels.

The manner that the panels were built at the instructables side was using the legs of the LEDS as the wire for all of the columns and rows. That actually should help most beginners, including myself, a way of consistently connecting everything up.  I would have considered doing this earlier but I didn’t like the method of connecting the panels.

If you look closely at the pictures from the instructables site you will notice that the LED’s in that example was pointing to the side instead of the more normal orientation(in my opinion) of straight up.  It appears that the orientation on the hackaday site is with the orientation straight up, but the actual cube does not appear to have perfectly straight lines.

The final result is actually very stunning.

I will upload a video in the near future showing the various patterns of this cube.  If I were reviewing this cube I would be stating how unhappy about the lack of instructions but quite pleased with the final results.

 

 

Posted in Review | Tagged | Comments Off on Just making it – a new cube

Smartphone maintence

Some things are really glamorous.

  • New Shiny smart phones
  • New Computers
  • Fancy New Development methodologies

Heck, just about anything that is not only new to you but brand new on the market is pretty cool.

However, there can be things that you can do that will make your old stuff new – well newish.

It was only a few days ago that I was busy cussing out my smartphone.  I didn’t think that it was that old. Perhaps the manufacturer used cheap parts.  Perhaps that phone was really not so good to begin with!  I was really getting upset when by accident I happened across a Youtube video about cleaning the USB charging port.

The idea is pretty solid.  How much lint has accumulated in the USB charging port each time you take your phone out of your pocket.  Is it the reason my USB cable seems to fall out without hardly any movement while charging on my desk.

That particular Youtube video was suggesting I get a small metal pin and file it down.  I watched some other videos and eventually I did find a more rational approach.  Instead of a metal which may really damage the port or channel some static directl into the device I found a video about using some thin plastic packaging that is also fairly strong.

Using this homemade tool you can very carefully pull out the tiniest pieces of lint.  If you are careful, thorough and keep at this you would be surprised at how much can be pulled out.

This is more fluff that you could expect to find anywhere other than your dryer.

Indeed once I finished with this small cleaning/maintenance job the USB cable still worked but now it would stay in unless you pull it out.  This was quite the difference from falls out if you look at the phone cable too long.

I am unhappy that I could not find that original video but I did find a similar one.  I would recommend you are careful. It does make sense that a bit of maintenance will extend the life of any of your devices.

Posted in Soapbox | 1 Comment

Excessive tracking and yet probably ineffective

I was reading an article on Arstechnica about tracking inbound cars in without a warrent or individualized suspicion.[1]

To me this seems a bit ridiculous and overbearing.  I am rather curious what you need to be doing that both looks really suspicious but yet not suspicious enough to either be searched, checked, and cross referenced at the border.  It isn’t unlimited tracking it is only for the first 48 hours.

I rather curious how exactly these devices would be retrieved.

officer            (knock knock)

person           Uh, hello.

officer            Well about two days ago we thought you looked suspicious
enough to track your car.  It didn’t pan out, so now we will
be removing that device from your car.

person           What!!!

I guess this is an interesting method of surveillance if the people in question are actually really dumb or are not taking any security precautions.  If you were a group of really organized bad guys, you might have your comrades cross the boarder and meet you at the first McDonalds.  You can all jump into a different car.  The border crossing car will eventually be towed away by McDonalds.  Quite obviously this could be any fast food restaurant, truck stop, gas station or hotel.

Not only that this pretty much implies that this is the only way that a bad person could make his way from place to place other than the “tracked” car.  Other methods of transport that are available might include any of the following.

  • rental car
  • bike
  • public bus
  • public subway
  • taxi cab
  • hitchhike
  • uber

Presumably the fine department of homeland security would have some sort of way of identifying whoever was driving the car.  Perhaps a photo or video or even passport information.

These are all great pieces of evidence in a court case after some fairly hideous act has taken place but it is somehow less helpful in a land that is about 3.5 million square miles (9.8 million square kilometers)  The only way having this photo information would be useful in preventing anything would be to increase security on the general population to an extreme degree.

You would need surveillance camera’s in every city on every streetlamp but also in every shop big, restaurant or other establishment big or small.  This couldn’t be limited to the big cities but would also need to include small towns.  In order for this to really function you would also need apartment buildings, bed and breakfasts and all hotels to also check or register people’s identification.

Perhaps this idea was thought out by the same people who thought that adding a backdoor to encrypted communications would be a good idea.

[1] https://arstechnica.com/tech-policy/2018/10/feds-to-judge-we-still-think-we-can-put-gps-trackers-on-cars-entering-us/

Posted in Soapbox | Tagged | Comments Off on Excessive tracking and yet probably ineffective

Roses are red, forests are green …

https://pixabay.com/en/trump-us-president-usa-policy-1822121/

Creative commons

“I was with the president of Finland and he said: ‘We have, much different, we are a forest nation.’ He called it a forest nation. And they spend a lot of time on raking and cleaning and doing things, and they don’t have any problem.”

 

https://www.theguardian.com/us-news/2018/nov/19/make-america-rake-again-finland-trump-forest-fire

The internet mocks Trump for saying ‘raking’ forest floors would prevent California wildfires

Posted in allegedly, Covfefe | Comments Off on Roses are red, forests are green …

more fun with datatables

I actually don’t get a chance to do much GUI development but I did get a short stint on a project that used datatables.  It is actually fascinating just how much of a facelift this does give your standard HTML.  I did a small example of this in my blog entry software development the easy way.

Between normal javascript and datatables it is possible to actually make web applications that have a feel of your standard windows heavy client application.

The only example I have to share today is the ability to do a bit more with datatables.  In this case the need was to add totals of the contents of the table as a summary line.  This isn’t so difficult if you already know what the total is but if you do not there is a small bit of code that will do the calculation for you.

         function intVal ( i ) {
		return typeof i === 'string' ?
		i.replace(/[\$,]/g, '')*1 :
		typeof i === 'number' ?
         		i : 0;
            };

	$(document).ready(function() {
	   $('#example').DataTable( {
           "footerCallback": function ( row, data, start, end, display ) {
            var api = this.api(), data;

            var ageTotal = api
         	.column( 3 )
		.data()
       		.reduce( function (a, b) {
             return intVal(a) + intVal(b);
             }, 0 );
         
             ageTotal = Number(ageTotal).toFixed(2);
             ageTotal = ageTotal.toLocaleString();
         
             $( api.column( 3 ).footer() ).html(Number(ageTotal).toLocaleString());
	   },

If you add this code, actually not much different than many other examples on the internet to your web site then all of a sudden you will see your footer change with the new value(s).

The code is not all that difficult to follow.  You can use this particular function to put any values that you wish into the table footer.  In my case it was a simple sum, but if you needed some fancy algorithm then this would be the place to put it.

Download source for this example

Download files

 

Posted in programming | Comments Off on more fun with datatables

Internet of things

Now is a truly amazing time to be involved with computers and computing in general. With the networking moving from computers to smart phones to everything else we might finally see some pretty smart houses of the future today.

So far I haven’t done very much of my own to create any of my own IoT devices.  In the past I have taken a small step in this direction.  I created a small light fixture that can be controlled from my computer.

Home lighting solution

http://blog.paranoidprofessor.com/index.php/2016/12/28/evolution-of-led-lighting/

http://blog.paranoidprofessor.com/index.php/2017/01/03/evolution-of-led-lighting-hardware-and-tools/

http://blog.paranoidprofessor.com/index.php/2017/01/08/evolution-of-led-lighting-software-solution/

Fun with LEDS

http://blog.paranoidprofessor.com/index.php/2016/09/24/just-making-it-a-4x4x4-led-cube/

http://blog.paranoidprofessor.com/index.php/2017/06/16/just-making-it-revisiting-my-cube/

I have actually created my own device that will play streaming audio from the internet. The sum of the parts (raspberry pi, Linux, open source software) is much greater than the individual parts.

Not only have I managed to create my own device but I have also managed to get it published in the Linux Magazine issue #203.  You can download that particular article from Linux Magazine at the following link.

Bedtime Music

Even better than that go and purchase the entire magazine.

Posted in programming | Comments Off on Internet of things

safe computing – passwords

Have you ever done something despite the knowledge that it isn’t really safe?  This generic sentence could be anything from jaywalking to unprotected sex.

In my case, the situation is perhaps a both more mundane and a 21st century problem.  I do have quite a few email accounts that are used for different purposes.  One of the ones that I used to catch spam should know better when it comes to security.

This login dialog looks very similar to many other login dialogs.  The only interesting part is the checkbox “Angemeldet bleiben” which simply means that your user will stay logged in.  This is not an unsurprising feature for personal email accounts.  If this value is stored on the computer or with the account it would make perfect sense.

The insecure thing is that every time you go to this site this value is set to true.  By default, your credentials will be stored on the computer, not a problem if this is your computer at home but an extremely poor policy if the computer is public used.

A proper solution

It is not a good solution to store the password or some token in a cookie on your computer.  A much better solution would be to have the password memorized and use it each time.  It is possible to keep a few passwords in your head but after a while, the number starts to exceed the memory of even the best person.

Of course, it is possible to scribble your password on a sticky note or write it down in your notepad but if security is truly a requirement then storing the password list in an encrypted file is the best solution.

Keepassx

There are a lot of password managers that are available – it must be true as when I googled “password manager” it returned 480,000,000.  There may not be that many but there are easily dozens of free and commercial versions in the Google Play store alone.

Basically a password manager, sometimes referred to as a password safe is just a small application that collects passwords not too dissimilar to an address book for email addresses.

The real trick is not finding a password manager that runs on your phone but one that fits how you best operate. In my case that was a password manager that is truly multi-platform.  The usability of my password manager, Keepassx, is just fine on my smartphone.

Multiplatform does not have to be a requirement.  The only time I really wanted a multiplatform was when I had too many passwords and wanted to restructure how they were grouped.

The reason that I ended up deciding on keepassx was it was possible to install the app on my smartphone but also to install the application on my Linux Mint installation.

It is possible to create a folder structure separate different aspects of your passwords.  It is also possible to store any other important number.

It is possible to create entries to store the simple user and password.

Keepassx has been made flexible enough to allow adding other values as attributes.

Finally, it is possible to assign cute little icons to your entries and folders.  This is not just a fun feature but makes it possible to visually see which types of entries contain what types of data.

I cannot recommend this software enough.  it is easy to use on your phone but it also possible to copy the keepassx database to your computer and edit it without any difficulties.

https://community.linuxmint.com/software/view/keepassx

 

Posted in security | Tagged | Comments Off on safe computing – passwords

A binary converter

I’m a hobbyist programmer and I program mainly in python, but am learning Ruby,which is similar to python. In this post I’m going to show you a simple python program:

#program loop
while True:
#input
    userinput = int(input('Which decimal integer would you like converted to binary?'))
#processing
    if userinput == 0:
        print('0')
        continue
    else:
        binary = ''
        while int(userinput) > 0:
            digit = str(userinput % 2)
            userinput = userinput / 2
            binary = digit + binary
    #output
    print(binary)

Can you guess what this does? If you guessed that it converts decimal numbers to binary numbers, you’re correct. I’ll be explaining how it does that now. If you want to try this program yourself you have to use python 3. I will be breaking the code up into little pieces and explain what they do.

INPUT

First lets start with the part marked as input. All it really does is ask you the question: “Which decimal integer would you like converted to binary?” and sets the variable “userinput” to the response of the user to that question.

PROCESSING

1. It checks if the value “userinput” is equal to zero.    if userinput == 0:

1a.The program prints 0.  print(‘0’)

1b.The program skips to the next loop.    continue

2. It does the following steps if “userinput” wasn’t equal to zero.    else:

2a. It prepares following steps by creating a variable called “binary” and setting it’s value to a blank string.    binary = ‘ ‘

2b. It will loop these statements as long as “userinput” is positive.                             while int(userinput) > 0:

~this statement sets the variable “digit” to the mod (the remainder) but as a string.    digit = str(userinput % 2)

~this step divides “userinput” by 2.    userinput = userinput / 2

~the last step of the loop puts the variable “digit” in front of binary.                            binary = digit + binary

OUTPUT

The output step doesn’t do much. It just prints the “binary” value.


TERMS

variable: an interchangeable value

algorithm: a sequence of commands

function: a kind of command

PYTHON COMMANDS

#something –> This is a comment. It will not be read by python. You can obviously put in anything for “something”

while a == b: –>This is a loop it will loop through the algorithm that come after it as long as the statement after the while is true.

examplevariable = 1 –>This command sets a value to a variable.

Posted in programming, Python | Tagged | Comments Off on A binary converter