Friday, May 2, 2014

Threading



I’d love to do lots of real time stuff, but like I’ve said before, I stink at threaded code.  But then I asked Google, and it gave me some interesting stuff.  But the real question is simple: why do I want to write multi-threaded code?

Think of this: A program is running, looking through a file.  Rather than displaying the old swirling toilet bowl of Windows 7, have the information that is being processed displayed on the screen.   Or better yet, a program collects information from various system logs.  The program looks at the syslog, and determines if something needs to be done based on what the syslog said.

An example of this is getting a message saying someone logged onto a router.  If someone logs on to a router, we probably want to inform the system administrator of the log on.  Only certain people should be logging in to a router.  A second example would be identifying when a cable is plugged into a switch in a public location.  Or, as a general rule you would want info on a certain circumstances. 

But information is coming in constantly, so information needs to be processed rapidly.  And a bunch of that information is going to be seen as junk and written to the logs.  That information needs to be processed as fast as possible because information is constantly entering any syslog system. 

Hence, multiple threads.  The idea is simple, but the execution… not so much.   Maybe that’s why I’m not a professional programmer.  Eh well.  Maybe I’ll figure it out one day.  Just not today.

Thursday, May 1, 2014

Syslog



SysLog

You know, there’s a lot of demand in the world for logging.   Great.  Let’s go get a syslog server and dump everything on that.  Great.  Now what?
So, you want to do something with those thousands of lines of information per day?  Yes?  So how in the world does one do all that fun stuff?  The first thought is to write a program to parse those wonderful syslogs and examine the data passively the next day.   Great.  We can do that.  All it’s going to take is about 30 hours of programming and testing to get all conditions down, and then make some sort of use out of them.   Because just capturing the information is only one part of the equation.  The next part of the equation is simple… what do you do with it?  
Sure, you can find that 208.118.237.22 scanned every port of your router, but what is that information worth?  Because every device on the internet is constantly getting scanned, and I don’t know of anything you can do to stop them.
Option part 2 is to take action based on what happens with those SysLogs.   So that means your program needs to get more complex.  Instead of buying your own bargain basement syslog software, it’s time to go code your own.  On the plus side, if you’ve already written the portion of the program to handle post event examination and processing, you can integrate that in. 
Once again, great.   Now what?  What can you do with the information?  Does the information need to be gathered for PCI compliance, or are you simply collecting logs and information that no one will ever read until you’ve been breached and your world is about to blow up?   Or is there certain specific stuff hidden deeply in all those messages that could be useful?
The only way to find out is to examine every single piece of information that comes through your system, log it, and then… 
Guess that’s one more thing I need to do…

So, the action items from this pile is write a program to accept and process syslog information.  And then get it to tell me what it didn’t know what to do with, so I can store it somewhere.   Or perhaps I need to integrate it with a SQL database so the information can be stored and examined.
Oh yeah, I suck at writing properly threaded code, so there’s that… 

Wednesday, April 30, 2014

Debt, debt, debt



As a mental exercise, I know the best use of any money right now is to pay off debt.  But it’s hard to remember that.  There is always a part of the brain that tells you to go invest or play around with this or that.  Your brain forgets the risk, and often forgets the plan you planned out.  Sure, the student loan I’m paying on has only 3% interest, but that’s not the point.  The point is that student loan is currently the lowest debt I have, and is near the end of repayment.  Only $300 to go until I can free myself from that thing. 

But my brain is saying “Go buy mutual funds.  You can probably get 10% on those”.  And sometimes, I also listen.  The math tells me I’m paying out 3% and getting 10%, so I’m gaining 7%.  I’m beating the system.  But then I remember there is an unwritten amount of risk in getting that 10%.  And very easily, my 10% could go to 2%.  It’s all based on the stock market, right?  So that risk is inherent. 

And I also know that no matter what, that 3% will run through to perpetuity.  Or at least until I’ve paid it off.  And once I’ve paid it off, then the entire problem goes away.  That becomes another $12 a month that I don’t have to pay on.  It becomes money that I can do things with, and the debt burden is lessened.

But I don’t want the burden to be lessened.  I want to be free from it.  And the only way to be free from the burden of debt is to pay it off as rapidly as possible.

I guess life covers just a bit of chaos theory.  Chaos theory, in general, states that the inputs of A and B aren’t necessarily additive.  Meaning, it’s not always A+B.  It might be A*B.  Or A^B power.  So the reliability of the measurement can cause drastically different changes.  Sometimes, we hope we could predict the outcome of our actions and our lives, but for the most part we just have to operate with faith and grace and move in the direction we want to go, with the assumption that we will eventually get where we want to go.  You may have to go sideways for a bit, but eventually you get there.   It’s all about behavior and action.  

And this blog ended up somewhere without really going anywhere.  And is brought to you by the word “burden”, which I have successfully misspelled four times before my spell check fixed the problem.

Tuesday, April 29, 2014

More on PCI Compliance



I’m sure for a large shop, PCI compliance isn’t as much of a headache.  But for a small shop, it is a colossal pain.  It is necessary to be complaint, but what constitutes compliance is a broad group of standards that only make sense to those who understand the entire picture.  So you need server, networking, point of sale, operations, and personal computer people all shoved into one person.  Did I mention that person needs to have a security mindset as well?

I could say I have a security mindset, but I’m not sure that’s true.  I used to think we had the most secure system in the world and that we had overbuilt and overdeveloped.  I am not necessarily sure that is true anymore.  In fact, I know it is not true.  I guess that’s why I’m taking the CCNA.  The more I know about routers, switches, and how networks operate then the more I’ll know about how to secure such a network.

But the more I find about what I know, the more holes arrive in my theory.  I guess I’m beginning to believe the network design we use is based off people who don’t think about security, so now security is becoming an afterthought.  It also makes me think that I need to redesign the entire corporate network with security in mind.  All it takes is about 70 interviews, a half dozen VLANs and some extensive ACL work.  Oh yeah.   And rewiring three buildings.  Nothing much at all. 

So I guess one could see my frustration.  But then, it’s my job to fix the problem.  It really makes me wonder… is it always like this?  Or is it just my company? 

Monday, April 28, 2014

PCI compliance



So…  I’m going back to school in fall.  I’m going to be taking a four semester CCNA course.  As much as I would like to think I’m capable of passing on my own, I think I’m way too distracted between everything I have an interest in learning.  So I’m outsourcing my teaching to a college.  I find it strange that I have to reapply to college to take one class a semester.  But I guess that’s policy.  Anyways.

My time at work has been on filling out PCI compliance documents.  That’s about as much fun as stick in the eye.  From a security standpoint, I agree with PCI compliance.  From a second level, I think it’s a giant game of pass the buck.  The entire purpose of filling out the documentation is to get the catastrophic event insurance in the event something happens.  Really, it is.  The wording on most PCI compliance questions are so ridiculously open ended that they can be interpreted in any number of ways.  Truly staying compliant would require a full time IT staff person with a high degree of skill and knowledge in about a dozen different subjects.  In my case, I’m that guy and I’m distinctly and horrendously under qualified.  That’s part of the CCNA info. 

But the CCNA info is only part of the equation, as that covers one portion of the broad requirements.  Most of the requirements seem to indicate the problem is most often internal.  Which I don’t disagree with the need to protect internally, it’s just that in my situation, I’m more concerned about protecting externally.  But that’s what happens when you have to follow what someone else tells you to do. 

Sunday, April 6, 2014

More questions I'd like to ask

These are questions I have to lay at the science minded people who happen to frequent this blog.

Disclaimer: 99% of the readership of this blog are bots.  

But, for those science minded people out there who stumble upon this hole in the web...   Then answer me this...

1)  The rules of science are resolute and repeatable.  Gravity works every single day of the week.  So do Newton's first, second, and third law.  But there are exceptions.  One of those exceptions is the Big Bang.

Science has spent a lot of time trying to explain this anomaly.  By anomaly, I mean events that only happened once.  The extinction of the dinosaurs doesn't count, as that is something that is unlikely but possible every single day of the week.  Several near-Earth misses have happened in the past 100 years.  I'm talking about things as absolutely weird as the Big Bang that have never happened before and have never happened since.

Events caused by human will are also invalid.  All human events stem from our intelligence and free will.  Combining those two things is a collective powder keg that can produce all sorts of anomalies.

I will count the development of human intelligence as one anomaly, as no other species has developed what humans have in terms of intelligence.

Name two other anomalies.   And if you count the one I've already given you, that means you have to come up with one.

Older questions that didn't have answers....
2) Given

  1. The age of the universe is finite.
  2. Matter can neither be created nor destroyed, only reformed.
Explain where matter came from.

3) Describe life 20 minutes before the Big Bang.  


So...  have at it.

Saturday, April 5, 2014

Ted vs the podcast

I haven’t listened to any Ted talks in a while.  I guess their discussion of “Ideas worth Spreading” seems to be collected around a set of central ideas.  It doesn’t seem like “ideas worth spreading” fit in the category of the beliefs of one group of people.  Seeing as how I don’t agree with that group of people, or the tone in which they discuss how they are right and everyone else is wrong, I quit listening to Ted talks.  I can’t understand why groups can’t use logic in order to advance their agenda.  After a while, you get tired of listening to arguments based off the seven deadly sins. 

So I quit listening to Ted talks.  Instead, I’ve started listening to podcasts.  The first thing I found was Andy Andrews.  He seems to be endlessly optimistic and perfectly willing to examine every decision he makes in ways that most people will not.  And I think he has reason to be endlessly optimistic.  Based off his biography both parents died when he was 19 and not long after he was homeless.  He then figured out what he was doing wrong, and started changing his life. 

There is a difference in the kind of discussion Ted produces and the kind that Andy Andrews produces.  One is exclusive, divisive, and doesn’t advance humanity in any appreciable way.  The other provides an inherently positive message and gives the individual the ability to advance their life. 


If you want to change society, you have to change each individual person.  And if the options are what Ted suggest or what Andy Andrews suggests, I’ll go with Andy Andrews.