Monday, December 16, 2013
DRM of the Future
Slowly my eyes begin to adjust, my alarm didn't go off. I look at my phone, oh I guess I was wrong, turns out for some reason the Beastie Boys didn't appreciate that I woke up to them, so they revoked my rights to listen to their music as an alarm. Whatever, I stand up walk to the bathroom and begin getting ready. I finish up head to the kitchen and get ready to check the news. Today feels like it's going to be rough. I check my news reader app, weird, something wrong with my account, I don't feel like messing with it. The news is depressing anyways. I look up some recipes and download them to my 3D printer. Pancakes and syrup sound nice. I finish up breakfast and head into work.
I sit down at my desk and turn on my monitors and computer. I wait for it to boot, the camera takes a snapshot and see's it's me, it proceeds to load some advertisements while I wait for the computer to boot (how nice). I work for a while go to lunch and come back. Once the computer attempts to login I'm told that the license for my OS is out of date and I need to pay to renew it. Bleh, call up Ted, "Ted, license is expired again, can you renew it for me?". "No can do, I guess our word processor got too popular, they refuse to re-license our PC's" said Ted. "Wait, are they legally allowed to do that? I mean isn't that a monopoly or something?" I asked. "Nope, we're free to compete, but we just can't use their products to compete, so no monopoly, although it looks like we'll have to start over if we want to continue, since we can't get into the PC's for the source code and the hard drives are encrypted." Ted explained, "I think I'm going to pack up and go home, you might want to do the same, nothing for us to do here". "Better update my resume" mutters Ted as he walks out the door.
Slowly I pack my things and walk out the door, as I climb into my car and tell it to drive me home, I ponder why we decided to develop on that OS. In fact I begin to ponder a lot of things. Why can't I listen to Beastie Boys whenever I want to? Why can't I just read the news? Why can't I just use the PC and the Operating System that I paid for? My head is hurting, I reach for an aspirin and look out the window. "Wait, this isn't the right way home". "Where are we going?". "Back to the dealership, I'm afraid they caught wind that the store shutdown, and they're revoking your lease" rattles off the car. We arrive, I guess I have to walk home, it's only 10 blocks better get going before it gets dark. I head home.
Exhausted I walk in the door and decide that tonight I need a break, I've been working a lot of overtime to get our app out the door. Tonight I am going to relax. I look up the spaghetti and meatballs recipe I bought a few months back, and program my printer to make it. I walk to the living room and turn on the television. I scroll through looking for the Sherlock Holmes Series I bought last month digitally but never got around to watching. I can't find it. I call up tech support, and I'm told that the new Sherlock Holmes is on The Onion, and since they own the original they decided that their customers should really be watching the new Sherlock Holmes when it's on, not the older Sherlock Holmes. "Great, so I can't watch it even though I bought it?". "Nope" replied the tech. No apologies, like I'm expected to know this. I hang up in frustration, walk out to kitchen to grab my food and find that there is no food printed. I check the display, "Two options available Sherlock Holmes Bangers and Mash, Sherlock Holmes Fish and Chips", I call up tech support for my printer. "Hello, I am trying to print out some spaghetti and meatballs, there appears to be some kind of error on my printer", "Let me take a look real quick, it says here that you're planning on watching Sherlock Holmes tonight, is that correct?" "I was planning on watching the old Sherlock Holmes, but I'm not allowed to", "So you'll be watching the new one?", "No, I just wanted to eat and go to bed", "I'm sorry but The Onion has paid for advertising at this time, we'll only be able to make those two items, until 9pm after that you can cook whatever you want again". "Are you kidding me? I can't even cook what I want to eat, with food that I already paid for with a recipe I already paid for?", "Nope", I hang up irate.
All the things start small, DRM to protect the copyright owner from losing revenue by pirating. A little leeway for a corporation here, a little leeway there. Initially DRM was a nuisance, but not a big deal. When DRM was on DVD's corporations would have to chase down every person that bought a DVD and take it back (if they really wanted to recall their product). When these laws were first enacted, not many of us could have even envisioned corporation X stopping by our house and saying "I want my DVD back". We all just laughed it off, and didn't worry about it. As we move to digital content, it's easy to realize that with the click of a mouse everything you "lease" can be taken away from you. I will never buy a Movie, Song, or other digital relic, as long as someone somewhere can type a few words and take it all away. This needs to stop. Refuse to buy anything digital that contains DRM. Start making companies that compete with these companies, and offer DRM free. Show the world and these corporations that we refuse to sit down and take what we're given. They have the right to put DRM on any and all of their products, but we have the right to not buy it. We have the right to produce works of art that aren't taken away from the world at the whim of a president of a company.
Thursday, December 5, 2013
Tool Smith
But even if you never look at that program again, here's the key advantage: For 57 of those minutes (the other two minutes being used to actually type the code), you were actively thinking, researching, and learning how to solve a problem. You may never reuse that exact code. But you've become a better programmer and thinker. The next program might take just 5 minutes to think about and write.I think it needs repeating, when you spend the same amount of time learning something versus mindless repetition, YOU WIN, you always win, because the next time it might take you 56 minutes and you've saved yourself 1 minute of drudgery, and 2 minutes the following, you've made more connections in that noggin of yours, and you've made yourself just a little bit more valuable to your company and others around you.
Chime in I'd love to hear your thoughts.
Wednesday, December 4, 2013
To Lead or Not To Lead That is the Question
"wahh my teammates dont work". I don't want to hear that. I tell them suck-it-up. If you're a leader u make it work. @ProfessorF and @olga_lavrovaThis will mostly be from the perspective of a student, however I will go over a real world example.
Working in a team is hard. Even when you can pick your teammates it can be tricky. Unless you've worked with them before and you have a good idea what their work ethic is like, its really like shooting fish in a barrel. You're essentially trying to pull off something that companies have a hard time doing with dedicated staffs, with weeks, resumes, phone and in person interviews, all in about 5 minutes at the end of class, or worse yet you're TOLD who you should work with. Like companies, you don't discover that the person was the wrong choice until you're far enough along you can't just get rid of them and get someone new. The cost is too high, the deadline is too tight. Training a new person just isn't feasible.
Friday, November 8, 2013
Learning From Requirements
In my opinion, along with any set of requirements, there should be a general "Theory of operation", or a Driving manual if you will. Then people new to your organization will have a little better idea what's going on. If you don't you're just making more work for them trying to extrapolate how to use a system by what it can and cannot do.
Another thing that would be nice, is to take an approach similar to the web, if you try to enter data in and it doesn't match, try giving an example of the "type" of data you're looking for.
If you're putting in a number but it has to be range limited, then say what that range is!
Anywho, thanks for listening, I have a few interesting posts that I am preparing for my readers (you), so hang tight. They'll be here eventually.
Monday, October 14, 2013
Unusual R&D Companies
Movies, books, maybe a theme park right?
Did you think about them as an R & D company? I know I didn't.
But lately they've been coming out with some really interesting things. The latest being Paper Generators.
http://www.disneyresearch.com/project/paper-generators/
The theory behind it is that you rub paper and it generates electricity to light up things, (or deal with e-ink displays/etc)
I'm really impressed, I wonder what other companies are doing some interesting R&D that you wouldn't expect. Do you know of any? please tell me!
Wednesday, October 9, 2013
Hacker Scouts
http://www.garratt.info/blog/hacker-scouts-is-awesome-technically/
Tuesday, October 8, 2013
Data Books
http://blog.yhathq.com/posts/ten-data-books.html
Open source Natural Language Processing book too (linked above anyways, but I don't mind duplicating)
http://nltk.org/book/
Thursday, October 3, 2013
HN post on getting the word out on an idea links
https://news.ycombinator.com/item?id=6488822
This is kinda my way of bookmarking something I'm interested at the same time, hope you find it an interesting read like I do.
Tuesday, September 24, 2013
Is it a job?
Monday, September 23, 2013
Cc2541 ti bluetooth mcu
This may work for a replacement to my arduino/Bluetooth combo for music glove, need to install eagle to view for size http://t.co/nzGrj1LBKa
And may need to adjust circuit, ideally I would like coin battery usage
Pressure Sensor
Don't have time to watch this right now but may be a solution for my fingertip buttons http://m.instructables.com/id/eTextiles-How-to-Make-a-Pressure-Sensor/
Wednesday, September 18, 2013
My thoughts on Projects and Learning
While I was mentoring one of my good buddies, we talked about projects and the like a lot. It was interesting, and I came to the conclusion that there are 2 primary types of learning when you're out there on your own. There is learning for the sake of learning, and learning to accomplish a goal (which is not learning in this case). I'll talk about each a little and what I think about them.
School Learning
Learning for the sake of learning is going through an entire API just to read up on it. Learning all the details of a language just to know it. One of the benefits of doing this is that you end up having a deeper toolbox to give you more understanding of the underlying structure. In some cases this learning may actually give you ideas because you didn't even know that particular aspect of an API or language worked that way or existed. Often times it simply allows you to recognize patterns of problems as well, if memorization is involved. The downside is that it's slow, if you spend the time to read every little bit of an API, or language, by the time you are ready to use the language (or API) they may be out dated.
Real Life Learnin
When you start a job in the real world, you don't just take the tools you learned in school and use them and nothing else. You start picking up new things constantly, and usually (unless you work at a really cush job) you won't be given the time to spend reading every bit. What you find is that you define your problem, break it into pieces, determine what pieces you know and which you don't. From there you research enough about each piece to complete it. The benefits of this approach is the quick feedback loop. You discover quickly what works what doesn't, what's easy what isn't. You also can start hitting a wider variety of items in your toolbox. You don't get the depth of school learning, but unless you are writing a very complex piece of software, or debugging, a cursory understanding is sufficient to complete the task usually.
When you set out to learn what approach do you find most useful? Do you use one or the other? Maybe a hybrid approach?
Why I decided to become an Engineer, or Why do I do what I do
When I was going to school, I would ask other students occasionally why they chose Engineering. Often times the answer was "My father or mother is an engineer, so that's why I decided to be an engineer". Occasionally, I would get a "I liked to take things apart so I figured ...>Engineer". Rarely I would get a "I don't know, someone said I should be".
While there is no right or wrong answer, doing it just because someone told you to just doesn't seem quite right. Doing it because you look up to someone is a pretty cool way to get into it, although without that curious nature I think you're pretty limited. I'm sure there are tons of awesome engineers who are engineers just because someone they looked up to is an engineer. And I'm sure people look up to them even now (which is pretty cool). If I were to pick a reason someone should become an Engineer I would have to go with the second choice personally. If you have a curious nature and like to look at how things work, thats headed in the right direction for what I think makes a Rockstar Engineer.
But this post is about why I decided to become an engineer, so I'll tell you (by the way, if you are an engineer, or well anything, tell me about what made you decide that career choice!). Way back when, I moved to Albuquerque to work on Flight Simulators for Lockheed Martin, it was a pretty cool job, but I was hired as a Tech, and thus was supposed to do "tech" stuff. This meant only hardware, even if I looked at the software and found a problem I wasn't allowed to fix it. A "degreed" engineer was supposed to fix it. I really loved how you could control something physical with software (re: I/O and robots, and lots of embedded stuff). I decided going back to school was the only way I would get to play with that stuff professionally. Back I went.
A number of years later (working full time and occasional semesters of full time) I managed to get my Computer Engineering degree from UNM. Just having that piece of paper opens a lot more doors I think. However, if you don't have a curious nature and want to learn more and more. You'll start running into more and more doors closing as time goes on. Just having a piece of paper might get you to an open door and talking to someone (especially in the early days of your degree), but if you're not constantly bettering yourself, and pushing yourself to learn more, you'll find you're falling behind.
Why do you do what you do?
Monday, September 16, 2013
Class Inheritance Problems In Python
I tried to call a function on a child, that calls the parent and uses the self attribute. It wasn't having it.
I got the error
AttributeError: Class Instance has no Attribute '
After some searching I came across this post, it was a little confusing but I think I finally got it.
http://stackoverflow.com/questions/16528171/attributeerror-child-object-has-no-attribute-name
Here is an example of the result in action:
*Notice I had to do Animal.__init__(self) for the function to work. It took me quite a while to figure this one out.
Tuesday, September 10, 2013
School, Learning, And What to do with it.
I became a little more enlightened. You see, I don't need to use almost anything I learned in school, except for some of the solid basics, you know, reading, writing, arithmetic. Its when you start trying to solve harder problems that people don't ask you to solve, that you discover that using those tools makes things easier.
I'll give you an example.
I was working on testing some code, it's pretty complicated, and it requires lots of inputs, it outputs 3 values. Now to figure out how to get a particular output can get kinda tricky. So analyzing the function, if you can reduce the number of inputs that change the particular output that will make your job easier.
One way of solving this problem is attempting to plot the inputs, and the outputs and look for commonalities. This was my first attempt at solving this problem. After speaking with a fellow colleague (You know who you are, if you want to be credited I'd be happy to link to you), he suggested that I could write a search algorithm. You see, I had completely forgotten about finding "maximum" and "minimum" values, I even think I heard about it in my Machine Learning class, but unless you are actively searching out these problems it's easy to forget that there are solutions you've already learned about.
Even better my colleague suggested that that particular line of code might be to prevent the variable from causing out of bounds (WITHOUT EVEN LOOKING AT THE CODE, THAT'S HOW GOOD HE IS). How did he know this? He listened to the signals. I mentioned things like Cosine and Sine were being used in the function. He knew at a high level what KIND of calculations were going on. So he made the guess that it could be protecting. He was right!
So all I can tell you is to keep actively seeking out those problems and using those tools we were taught. I was wrong. I can admit it.
On Converting Ada to Python Pt 1
I.E.
Ada:
function Convert_to_Something(This : in Dog) return Animal is
begin
return This.Animal
end Convert_to_Something
Python
(in class definition)
class Dog:
def Convert_To_Something(self):
return self.Animal
How they're called:
Ada:
Convert_to_Something(This
Python
Saturday, September 7, 2013
Thursday, August 29, 2013
My New Hammers
Map
Suppose I've got a fun list like this: (In Perl)
@a = ("blarg.raw","blewy.raw","breqs.raw","blraw.raw");
suppose I want to strip .raw off each element of the array?
@a = map { s/\.raw//; $_ } @a
Guess what @a looks like now? Yea you guessed it:
@a = ("blarg", "blewy", "breqs","blraw")
I happened to need this in perl, so thus the perl syntax.
Filter
While talking to a buddy he mentioned that he was taking two lists, finding the smallest element of one list, and then kicking any elements that were smaller from the second list. Sounds like a job for Filter to me!
I haven't tested it but based on my understanding something like this should work:
lowestElement = 10
yourList = [1,2,3,10,45,6,7,8,876,543,3245]
yourList = filter((lambda x: x > lowestElement), yourList)
guess what yourList looks like now?
yourList = [10,45,876,543,3245]
Pretty awesome right?
Now I hadn't suggested it to my buddy but I'm thinking that we can somehow use reduce.
Update: (12/5/13)
If you want to "mimic" a similar functionality as filtering you can kind of use map, in this case here is an example:
@a = map { m/.*\.raw/ () : $_} @a;
so in this case if we match "raw" in the name, then we can toss it out, otherwise we can store off the value.This allows us to reduce to only a set of files that don't already contain .raw, we can also do other operations.in place of the regex match, but I wanted to keep this around for reference (I actually needed to use it today)
Reduce
I'm not even remotely sure if this could work, but reduce keeps using elements in your array.
Something like this *might* work for him
firstList = [2,3,4,5,6,7,8,10]
firstList = reduce((lambda x, y: y if x>=y else x), firstList)
So the idea here is that we compare each element, to eachother, find the smaller of the two, and then get rid of the other.
I think that's pretty neat, and I expect the result to be 2 in the above example.
Thursday, August 15, 2013
Communication through space
I was thinking about if we took a space craft and gave it a bunch of little beacons whose job is to simply transmit any message that it receives to any other beacon it can reach. We could put a time stamp on it (using our Absolute Time we have calculated), and each beacon when it see's it can determine if it's forwarded it on or not. This is all cool and stuff, but if we assume that we're restricted to even radio waves for speed (not light), we could conceivably send something out that is constantly transmitting, eventually due to distances and these restrictions, when we receive things from it will begin to distance themselves. Imagine listening to transmissions from years in the past that are being heard for the first time? Imagine if someone took off from earth, and once they were say a distance of 50 earth years transmission time (so we get their transmission 50 years after transmission), we start hearing a new form of music, or hearing about discoveries. We would literally be listening to echoes from the past. New discoveries from the craft could be getting transmitted to us and we would be discovering them years in the future. I for one find this facinating.
Some of the upcoming posts are a bit inspired by Elon Musk's big ideas, If you don't know who he is take a look at his wikipedia page, I think some of the goals he has are amazing, and I agree that we as a society need to start focusing our efforts on big ideas, and not on the next fart app. A collegue and I have been chatting about space travel and how amazing it would be to make it to Mars, so we started looking into it, I don't know much of anything about it, but who knows, maybe I'll learn something, and maybe you will too.Either way, knowing more about a wider range of technologies makes us better as a human race, fart apps, don't.
Wednesday, August 14, 2013
Navigation in Space
Aircraft have flight management systems to determine how/where to go and in the most economical ways, etc. I can only assume that the same goes for space. The biggest differences being that on earth we travel and we have gravitational constants that are known, and we can estimate different things like drag, etc, we have to determine where we are with respect to other aircraft in order to stay safe (I believe this is ADS-B stuff, correct me if I'm wrong). In space you have to worry about other aircraft (assuming space gets busy out there), still, but now you have to calculate where you're going to be at different times, where other planets are going to be (this is for long distance space travel). Gravity of each of those planets, using our current systems we can determine what speeds we need to increase/decrease to in each phase of our travel (I won't call it flight, because to me that implies aerodynamics and dealing with things like drag/etc),so we can miss a planet, all together, or avoid the most of it's gravity, also we could use them to our advantage to make turns while maintaining forward thrust only (don't waste fuel on pushing side to side). Obviously my last post Absolute time plays a part in this whole mess, if we don't have a constant time wherever we are, calculating these things will get very tricky.
Some of the upcoming posts are a bit inspired by Elon Musk's big ideas, If you don't know who he is take a look at his wikipedia page, I think some of the goals he has are amazing, and I agree that we as a society need to start focusing our efforts on big ideas, and not on the next fart app. A collegue and I have been chatting about space travel and how amazing it would be to make it to Mars, so we started looking into it, I don't know much of anything about it, but who knows, maybe I'll learn something, and maybe you will too.Either way, knowing more about a wider range of technologies makes us better as a human race, fart apps, don't.
Tuesday, August 13, 2013
Absolute Time
Absolute, true and mathematical time, of itself, and from its own nature flows equably without regard to anything external, and by another name is called duration: relative, apparent and common time, is some sensible and external (whether accurate or unequable) measure of duration by the means of motion, which is commonly used instead of true time ...https://en.wikipedia.org/wiki/Absolute_time_and_space
So this got me to thinking, suppose we were really into space travel, suppose our super fancy atomic clock that was set back on Earth to the relative time there, and our super fancy clock broke. Uh Oh, how can we know where earth will be at any moment in time?
Some things that I think need to be overcome to determine an "absolute" time:
- Mapping trajectories of ALL universes
- Planet/stars etc.
Some of the upcoming posts are a bit inspired by Elon Musk's big ideas, If you don't know who he is take a look at his wikipedia page, I think some of the goals he has are amazing, and I agree that we as a society need to start focusing our efforts on big ideas, and not on the next fart app. A collegue and I have been chatting about space travel and how amazing it would be to make it to Mars, so we started looking into it, I don't know much of anything about it, but who knows, maybe I'll learn something, and maybe you will too.Either way, knowing more about a wider range of technologies makes us better as a human race, fart apps, don't.
Sunday, August 11, 2013
Some thoughts on attempting success in a large organization
If you want to do well in a company like this you need to think of ways to do one of two things.
1. Make them more money.
This is where having ideas for new products and ways to bring in more revenue come into play. Look for areas of opportunity, what things do potential customers struggle with daily, that you/your company can fill the hole with a "new" product. Sometimes this happens because you've found something that you do daily that could be made easier and boom new idea. I think this is sort of how Trello came along, it was frustrating keeping track of where everyone was on projects/etc, and Fog Creek came up with something to make it easy. Now it's a product their customers can use.
2. Save them more money.
I HATE sitting around on my butt doing things that computers should already be doing. Working in a software company, there are too many times I have to watch test scripts run and do things when they pause. Finding ways to "fix" these pauses, so you don't have to have your butt in a seat is a money saver, and companies like that. One of my latest "money savers" was writing a wrapper that used auto hot key, so now whenever a script needs the user (note: me/collegues) to do something, we just have the auto hot key utility do it for us. It saves engineer hours, and sanity (if you're anything like me you hate the idea of wasting your precious time sitting and waiting for some "dull" event to occur just so you can do some dull thing to make the next event occur!).
How do you do these things?
Always be cognizant of your surroundings, look for opportunities. If you see something you think would be neat to try, go for it. If you have to do it a little on your own time to get a proof of concept by all means. Now if you're spending months of it, I would at least bring the idea up to see if it sparks interest, and possibly get paid specifically to do it (otherwise you're giving away your time to a company that has no vested interest in you other than "Wishes to avoid training someone new" which I may talk about someday).
Every day when I sit down and look at what I'm doing, I think to myself, how can I avoid having to do things that I don't find fulfilling, I can't always automate things, but I'll be darned if I don't try whenever I think it makes sense. We are engineers, not monkeys, and to be honest making us sit in front of a PC and act like monkeys just doesn't make sense. So lets do something about it, make a change and see what happens. I think you'll find that if you make it simple (easy for everyone to use), and it works, you'll at least attract some attention, and maybe even some more interesting projects. I have always said, you make the work you do what you want it to be. So make it!
Saturday, July 27, 2013
Latest Projects
This is a wrapper to download a mRSS feed and then play it in a random order on your Raspberry Pi
https://github.com/onaclov2000/omxrssplayer
This is a Text to Speech wrapper, that uses google to do the translating, it could really do some improvement, by counting the letters, then splitting on or before the 100th letter (space).
https://github.com/onaclov2000/pytts
I'm working on using the code from this link:
https://github.com/raspberrypi/firmware/tree/master/opt/vc/src/hello_pi/hello_font
to try to overlay a news feed of sorts over the OMXrssplayer (wrapper) app I wrote.
I would like to keep working on the pytts, and get a pystt (speech to text), and then have it listen to my voice and do things (kinda like Jarvis from Iron Man :) )
I thought it would be fun to setup a chatbot and then connect all three, so I say something, it relays it to the chatbot, which responds, then it converts that to speech, so it can talk to you!
Anywho if you like it, and want to start building up components that would be cool, let me know, I would love to build it to work with Wolfram Alpha too, but even more I'd like for it to have a learning algorithm so it can be taught, and/or learn. (I like AI, but don't know much about it yet).
Friday, June 28, 2013
Back in the Day.
Tuesday, June 11, 2013
Delete Site on Admob
Steps:
- Login
- Click Sites & Apps heading (mine shows up there by default so no click necessary)
- Hover over the site you wish to get rid of.
- Click Manage Settings.
- Next to the title of your app, click edit.
- Navigate to the section near the bottom titled Delete Site.
- Click Delete Site.
Friday, May 24, 2013
Tip Calculator
In keeping with the madness I've written a tip calculator this week.
https://play.google.com/store/apps/details?id=com.onaclovtech.tipcalculator
Temperature converter
So I started out doing a simple converter for Celsius, Kelvin, and Fahrenheit, found a Wikipedia entry, kinda went overboard, now there are a ton of conversions, and the best part is they're simple to do, just drag the slider.
https://play.google.com/store/apps/details?id=com.onaclovtech.temperatureconverter
Wednesday, May 22, 2013
Percent Off
Percent off is my latest app, figure I'll go for breadth in the app store, not depth...lol
https://play.google.com/store/apps/details?id=com.onaclovtech.percentoff
Friday, May 17, 2013
Simple Perl Actions Template
Wednesday, May 15, 2013
Project Idea: Self Learning Samba System
Anyone want to do build something like this for the betterment of mankind? (yea, 1st world problem right?)
Thursday, April 18, 2013
Language Wishlist
Write a foreach loop and use the syntax below (basically perl but a little weird looking)
foreach
{
So I can loop through multiple arrays in the same iteration and not have to have arrays of arrays or other crazy stuff.
}
Also I would like to be able to pick a "random order" of ALL of the arrays, but the indexes are linked, I.E.
@array1 = lah,bl,a,we
@array2 = 1,2,3,4
I would love to see a "random function" or keyword, I can use that will rearrange it to something like this:
@array1 = bl, we, a, lah
@array2 = 2,4,3,1
(basically the original indices stay matched).
Now of course I could write a tool which will do the second one. and I could write a "templating language" which would essentially replace
Saturday, February 23, 2013
Twitter the next text messaging app?
I was reading a tweet by @haacked and came to a realization, not sure if he has realized it but using twitter as your text messaging is brilliant.....
Phil Haack (haacked):
If you are with @shiftkey tell him we're waiting for him outside the lobby of the Hyatt by the valet!
Here's why:
Suppose @shiftkey doesn't check his messages often, but his buddies with him do, if they follow haacked they may see that message and relay it to him, its like being able to get someone's attention without having to explicitly text him and friends, one message and you're done. I really like the idea, my only issue with twitter still is privacy, of course I've heard rumors of people tracking others inline presence to determine if they're home or not (for nefarious purposes) aside from that hiccup its a really useful tool for that. Of course if you don't know shiftkey and you most definitely aren't at the hotel this is just noise, which makes me wonder, would location aware tweets make sense? You only see a tweet like that if you're within x miles of said location/person?
Just some thoughts!
Tuesday, February 19, 2013
Speed up Eclipse in Ubuntu
I found a github site https://github.com/flexiondotorg/oab-java6.git that handles that, however it required a few extra steps, so I just made a quick script for it.
I'm sure there are some parameters that can be added so you don't have to keep adding yes to things, but this was a quick and easy with minimal monitoring, if you make an update (just fork the gist), then let me know and I'll include it here.
Here is the gist:
Sunday, February 10, 2013
Ripping DVD's in Ubuntu 12.04 -- Handbrake
Let me know if you have any additional tips and/or tricks to install that will setup everything!
Roku SSDP nodejs
However placing the roku parameters ST: just wasn't working"roku:ecp", I did notice in the notify from the box that it was using MX as 2, so I tried updating that, however still no luck. After consulting nodejs.org I discovered the optional call back and in their example they close the connection when the call is completed. So I made the update to the following.
It appears that the program was closing the client connection before the message was sent out (and a response occurs), so once I put in the callback to close it, I got a response. Hope that helps anyone else who wants to use SSDP.
Check out the Roku Remote nodejs module I am working on.
Friday, February 1, 2013
Music Glove Explained
(Introducing Proof of Concept Music Glove)
Here goes.
The glove connects to the arduino over I/O. (basically just use some I/O pins to read a pressed state).
I wrote some code (referenced by this post: ) to transmit over the arduino's RS232 (Serial) port. The RN-42 uses RS232 to communicate to the device, so as long as the baud rate, etc are the same, then sending data from the Arduino to the RN-42 is a breeze.
Next we need a way to read the data. Download the bluetooth chat application from google (located here: ), modify it where the line says
Next I added some code to read received data.
The receive message section should look something like this:
Changing Volume, songs, etc, are all located in the following function I stuffed in there.
Of course you need a preferences to deal with things but you don't have to, you can simply just say if you see A, then do the action listed for the one you want in the above code.
Put it all together and you have a device which will change the volume or songs (if you set it up via preferences). Remember that some of the options are not publicly declared intents so they work right now, but may change in the future. If you have further questions go ahead and leave a comment, or find me on twitter @onaclov2000.
Thursday, January 31, 2013
Using Nodejs as a fileserver
Creating a Simple Fileserver.
Tip #2
I wanted a simple fileserver, I tried looking for a variety of search terms, but finally came upon simple file server. I came across the post linked by Tip #2 above, but it wasn't exactly clear what it was doing exactly.
The documentation isn't 100% clear so I played with it a little, (and added some comments to one of the posters).
I used connect.
Install it with npm connect.
Next use the following code:
.use(connect.static('pathyouwishtoserve')) tells the server where to look for files.
var connect = require('connect'),
http = require('http');
connect()
.use(connect.static('pathyouwishtoserve'))
.use(connect.directory('pathyouwishtoserve'))
.listen(8080);
.use(connect.directory('pathyouwishtoserve')) tells the server to return the following directories contents.
If you now navigate to http://your-ip-address:3000 you'll get a list of the directory contents,
if you add a /filename to that path you'll get the file.
I'll be posting tips as I come across them of using NodeJS as an intranet fileserver.
Long story short, I want to build a Roku app that will refer to the NodeJS server for where to find the files. I figure it'll be simpler than PLEX, and also faster (I'm hoping). Once I get the stuff running I'll plan on running it on my Pogo Plug as a media server for my Roku, totally awesome!
Tuesday, January 29, 2013
Creating a Kindle EBook Part 1
It's not quite that simple these days. When you send that zipped file out to your kindle, amazon splits it up and you get each item pushed to your device, so if you have 3 pictures, you have 3 pictures plus your html ebook.
The fix for that is to create a .mobi file, now there are some sites that do that, also the program Calibre works, but for now I decided to try using Amazon's solution. Kindlegen
I use ubuntu so I'll be giving the ubuntu version, if you want an example in the Windows version, then let me know, and I'll try to update for that!
Here goes.
I found this little trick out, create a file called kindlegen located at /usr/local/bin
enter in the following (I had to use sudo):
#!/bin/bashafterwords use the following command
exec/kindlegen "$@"
:/>sudo chmod -x /usr/local/bin/kindlegen
Now whenever you want to convert an html file, simply call kindlegen
Lets make a book.
First lets try the following
Based on the website I mentioned at the top they suggest naming things page_nn.jpg, etc, however as long as you keep track, it doesn't really matter the naming (it's for simplicities sake).
This particular book has 3 pages. Duplicate the following lines for each page, and you're set.
Save your file as test.html (or whatever you want, just substitute your filename below)
Next we'll actually create our Mobi File.
Navigate to the folder via commandline:
:/>kindlegen test.html
The resulting file will be called test.mobi
Next login to your amazon account check your account settings and scroll down to manage your kindle.
Click Manage Devices
Here you can find your email address to send your mobi file.
Next email your .mobi file to that email address.
When you see the file visible on the Personal Documents Section. Check your kindle and see if the file has arrived. If not, you can "resend" it using the Personal Documents Section.
Good luck!
Sunday, January 27, 2013
Using NodeJS as an Intranet Webserver
Long story short, I want to build a Roku app that will refer to the NodeJS server for where to find the files. I figure it'll be simpler than PLEX, and also faster (I'm hoping). Once I get the stuff running I'll plan on running it on my Pogo Plug as a media server for my Roku, totally awesome!
Tip #1
When running a http://nodejs.org/ port, the IP address should be of the machine you are currently on. I chose the port 8080 as it's the standard http port.
From linux you can find this by doing a simple ifconfig command on the command line. From windows ipconfig should do it.
Then using the example below: (from the NodeJS website)
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080, '100.11.1.6');
console.log('Server running at http://100.11.1.6:8080/');
So when you go to another machine such as your phone and access the page 100.11.1.6 you should get "Hello World". When you're able to do this, your Roku can now see the server (when you have the app setup).
The above tip was discovered after a google search to figure out an error. The link is from stackoverflow, and can be clicked above on the Tip #1 link.
Friday, December 28, 2012
How to quickly build amazon affiliate links on an android device.
Download Amazon Affiliates Link Generator.
Tuesday, November 27, 2012
Syncing Picasa
Sure someone can share an album with you, but if you want to view it, you have to find the link, until google allows shared albums to be visible in your account (and indirectly visible via your Android phone). You'll have to just deal with it.
I got tired of dealing with it, I started working on a project, right now it does a one way "copy" from one account to another, I have plans to finalize the checks that compare the folders (albums) and determine what differences exist, and move photos back and forth to sync them.
My current implementation runs from a python script, and you have to have the Google API's loaded. This is great for those cases where you only need to sync once. However I want to sync say, once a day. Using this locally would require my computer to be running, what if my other family members wanted to sync albums with eachother? Now we have multiple instances.
Eventually I would like to set this up to run on Google's App Engine on a daily or more frequent rate, however oddly enough, their API's are not as clearly available via App engine.
On a positive note, I hadn't really done much programming in Python prior to this project, now I've begun, I don't mind it as bad as I originally had (don't get me started on the whole whitespace thing).
If you're interested in what I'm working on and would like to poke around, follow along, (or maybe help) you're welcome to check out the repository located on GitHub.
I'll keep you updated as I move along with this project.
https://github.com/onaclov2000/PicasaSync
Wednesday, November 14, 2012
Introducing Geek Book Club
I recently created a repo on GITHUB, so check it out.
https://github.com/onaclov2000/GeekBookClub
Thank you,
Tyson
Tuesday, October 16, 2012
Unit Testing with Structural Coverage
I don't love spending time testing, so I try to make the best use of my time. I write Unit Tests when I can, and automate any other testing if possible. Sometimes I try to even make writing tests easier on myself by using some techniques I picked up from The Pragmatic Programmer: From Journeyman to Master
Side Note: If you haven't read this book, stop what you're doing, go buy it, rent it from a library, borrow it from a friend I don't care, READ IT, LEARN IT. It's one of the best books I've read about software development hands down, lots of good ideas to improve your craft.
Unit Testing
Unit Testing code is helpful for looking at code you've written in a very controlled environment, you know the inputs and outputs, and being able to duplicate your results should be pretty consistent and easy. Often times this testing puts a single function or procedure through the paces, but depending on what level you are will determine what number of units will be involved.Primer
After writing some code a few months back, I created what I thought were some good Unit Tests for it. They all passed in the end (and before they did, we found some issues when they weren't passing) which is great. The change got closed and merged into the baseline. I thought I had made a good attempt at ensuring that the software was solid. For the data I used I agree it is solid. Then a bug was found. I hadn't tested every case (even though I thought I had). What would have been a huge help is to have simply combined Structural Coverage with it.Structural Coverage
Structural coverage is attaching special code to test for running through each path of your code. This is helpful for simply ensuring you've tested each route. This isn't a substitute for proper testing. I'll say it again. A structurally covered program is NOT a bug free program. It's simply a program that has been proven to work as expected for a (pseudo) normal scenario on each path encountered.Combined Testing
By combining Unit Testing and Structural Coverage, you can prove that the Unit Tests at least are checking each case once. I have since re-ran the unit tests with Structural Coverage, and guess what? I missed a few paths, this didn't explain my particular problem, however it made it easier to see other possible problems I may have in the future. I have since added some unit tests and have made sure that my Unit Testing at the minimum covers each case.No program is bug free, but all we can do is analyze and pick the Unit Tests that we as Engineers believe will cover what's necessary.If you don't do Unit Testing where you work, I highly recommending starting to do it on your own. From the start make it as easy to setup and run as possible, this will make sure that you will use it, and that your colleagues will use it. Additionally, look for opportunities to make the unit testing automated. If your unit tests run on the system everytime a build is ran, any bugs introduced in those pieces of code can be found quickly. This keeps you from violating the DRY principle, forcing yourself to repeat yourself testing it over and over. OR trying to fix the same thing multiple times because it's not caught at the right time.
Good luck!
Monday, October 8, 2012
Christmas Lights
Final Solution
I finally actually did what any smart engineer* should do. I took a look at what was already there. I saw 2 chips the first was a LM393 a dual voltage comparator. And the second was a programmable timer. JACKPOT. (Here it is for those of you interested: cd4541be). Looking at the datasheet I see there is a master reset line. I tested it out by turning the system on for 1 hour, then when the lights turned off, I simply tapped 3.5 volts to the MR line and bam lights were on again. I now have my "in".
On to the Microcontroller
However over the long term the timing was off for sure, when I got back from vacation it was definately wrong, I'll have to play with it this christmas again!
*Smart engineers keep things simple, and just using a reset line is MUCH simpler then the previous methods I tried.
Monday, September 3, 2012
Syncing ZSNES game saves across ubuntu systems
First I made a folder in dropbox for my game saves and made a copy of my current saves out there.
Next I removed the contents of the zsnes folder located at
/home/
Steps:
(Make sure you've saved the files from .zsnes folder below first
cd ~/.zsnes
rm * (this gets rid of the files)
cd ..
rmdir .zsnes
Finally I setup a simlink from my dropbox to the folder so I always had my game saves synced.
Steps:
cd /home/
ln -s ~/Dropbox/zsnes .zsnes
Substitute the path with your path and bam you're done!
Good luck
Saturday, September 1, 2012
Environment Tips
Often times you have to swap between screens, I usually use alt/tab or some combination of swapping between document/editor in order to read and update. A neat tip Phil alluded to was that if you set your command line to semi transparent, you can still read any commands or notes while typing your code or commands over. This is a great tip as it can save time on having to constantly swap between (possibly losing your train of thought).
Thanks Phil and any other tips you pass along I'll be happy to post!
Wednesday, July 18, 2012
Energia Setup
Monday, July 9, 2012
IAMHERE 2.0
There are a few categories and if you have any suggestions let me know and I may add them to my list of updates to include.
If you have any suggestions let me know and I'll definitely look into them.
Thanks and have fun.
https://play.google.com/store/
Wednesday, April 25, 2012
Introducing Proof of Concept Music Glove
It was a long and slow journey, I've often times got so many projects in the pipeline that it's really exciting when I get to see one finish up.
This evening I finished up wiring my device, and asked @civissmith over to help with the video, so Thanks I really appreciate it, trying to do what I was showing with one hand would have been, painful to say the least.
Basic concept, Buttons attached to arduino send characters to android app, when music is running, pressing a button allows control of the music app.
![]() |
| Shot of Glove |
![]() |
| Shot of Glove |
![]() |
| Button inside glove |
Without further words, I think the video will be proof enough.
If you'd like to follow me on twitter I can be found here: @onaclov2000
Monday, April 16, 2012
Causing the next song to play
Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "next"); sendBroadcast(i);Good luck.
Modifying Bluetooth Chat
Well I finally grabbed the bluetooth chat application from the sdk examples folder (when you download from google). After about 5 minutes I tried loading the default app on my phone and touchpad, it worked just fine. I then changed ONE LINE of code and my arduino can talk to my android devices with bluetooth. What line say you? This one:
In the BluetoothChatService.java
From
private static final UUID MY_UUID = UUID.fromString("fa87c0d0-afac-11de-8a39-0800200c9a66");
To
private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
That's it that's all it took. Apparently that UUID from what I've been able to gather is for the bluetooth serial interface, so that's all I needed.
Here is video proof of the application in action.
http://youtu.be/Zof0IYUU71Q
Good luck and let me know if you have any questions.
Monday, April 9, 2012
Ada Withs
I liked that, but didn't know of anything that did the same thing for Ada source code.
I have began creating a script which does this, and you can use programs to run it, (perhaps port it to a plugin for a program).
I called it Ada-Withs (I know it sounds pretty boring)
It's not complete, but right now the script will pull out all packages used in the program.
If you want to give it a try go for it. If you want to mess with it, pull and let me know if you have any improvements.
The link above does go to it but here is the full url as well:
https://github.com/onaclov2000/Ada-Withs
Wednesday, April 4, 2012
One Language to Rule Them All
Last week I recommended not attempting to solve a particular problem with python. The solution was already partially coded up in perl and it just didn't make sense to re-solve the problem (simple data parsing) all over again. It got me to thinking, was this the right suggestion? I think the final result of the script should have been in perl, however learning to do it in python was a good idea. It would improve their toolbox.
I realized I should encourage writing things in a variety of languages. Why? So you know which tool to use. I came to realize that parsing data was easy to do in perl 90% of the time. If I knew python better I would probably feel the same way about python. The issue isn't about python vs perl vs java vs c++ vs c#, the issue is knowing what to use when.
I know that if I want to make a simple fast to build gui application I can use Visual Basic. Joe Blow will use Java, and Jim Bo will use Perl. Are any of them wrong? No, what you use, depends on your tools available. If you know how to do the same thing in 5 different languages, you'll start using a default for one set of problems, another for another, and mixing them if necessary.
I can solve the same problem in every single language, but the issue is, which is easier to do it with? Do some research, if you find that dragging and dropping a button onto a form is easier then writing the back end required to create you idea. DO IT! There is nothing more encouraging then building something and actually seeing it working, then spending tons of time building something and never seeing it come to fruition.
Good Luck.
Monday, March 12, 2012
New Apps
Well it was a busy couple of weeks, I have released 2 apps on the market in the last few weeks. Pizza Area, and I Am Here.
Pizza Area
This calculates the square inches of a pizza for you (really works for any size circle with a diameter), Also if you have a price it'll calculate the price per square inch, as well as the estimated cost at that rate for the pizza size smaller and larger that the app contains. Give it a try and let me know if you have any suggestions, and as always a positive rating on the appstore would be appreciated.
I Am Here
This app will allow you to select a friend from your contacts (or type the number in) and when you hit the icon it'll send a message. This app is very similar to another one on the Apple Market, I was a little disappointed I hadn't released this sooner, my buddy civissmith had come up with the idea originally, and I was just way to slow to implement. Well give it a try either way, I think mine has a little more spunk then the Apple Market version.
That's all for now, I have so many projects in the works at all time, I just have to finish a few so I can write about them.
Thursday, February 16, 2012
GraphViz
To call a file use the following command (works for me).
dotThis generates a png file..gv | dot -Tpng > .png
digraph G {Hello->World; World->Earth; World->Mars; World->Jupiter}
Friday, February 10, 2012
TrueCrypt
I.E. FROM: truecrypt-7.1a-setup-x86
TO: truecrypt-7.1a-setup-x86.sh
Good Luck
Tuesday, January 10, 2012
Android Like SQL Statement, sqllite sql software
After doing a little reading it turns out that if you enter in a ? in your query it pulls the selection arguments and stuffs them in where that ? is. My first example didn't exactly make it clear that ? was replaced with the arguments, so now that I knew that it led me to my next train of thought.
As silly as this might sound my original query that pulled exact matches in used this:
cursor = db.query(DBHelper.TABLE, null, DBHelper.C_TEXT + " =?", whereArgs, null, null,null);
I finally tried this:
cursor = db.query(DBHelper.TABLE, null, DBHelper.C_TEXT + " LIKE ?", whereArgs, null, null,null);
Guess what? The whereArgs get stuffed in the ? position.
As much as I could have sworn I tried this, apparently I tried various iterations. Be sure if you're going to use this, make sure you have "column" space "LIKE" space "?" and then your arguments as the next parameter. If you notice that the first example I was using had no space between the front, between the = and ? as well as behind, this is part of what tripped me up, LIKE is a word so you have to be sure to separate them using the right spaces.
If you're not sure what a column is take a look at W3 Schools SQL Like Tutorial. It doesn't explain the ? and how that works with respect to android. But after reading to this point you should be able to use the LIKE command in android.
I hope this helps others, so long and short of it, I can now query my db with a like operator, and it works.
Note* whereArgs contains only one element which contains % on either side in my case (%string%). Perhaps in the future I'll poke around at the options when I have more then one string in that field.
Monday, December 5, 2011
MSP430 TI Launchpad
http://hackaday.com/2010/08/11/how-to-launchpad-programming-with-linux/
http://springuin.nl/en/articles/launchpadwindows
http://hackaday.com/2011/02/24/debugging-msp430-using-eclipse/
http://hackaday.com/2011/02/15/learn-to-debug-msp430-chips-using-iar/
http://hackaday.com/2010/08/13/porting-code-to-msp430/
Monday, October 17, 2011
Music Glove Part 1
I now have half of my Music Glove prototype complete. This is the hardware side. I paired a bluetooth module from sparkfun (something that does uart). With an arduino to handle the button presses. I can now receive an A and a B from my button presses on my phone using the BlueTerm application.
Once I am able to handle receiving the bluetooth data on the phone side, I will better package the whole assembly.
Here is a shot of the circuit:
Here is the code which does all the work:
/*
What you will need to do is wire up your bluetooth module hooking the RX and TX up to the arduino, then
*/
// A is IO 2
int A = 2; // Switch connected to digital pin 2
int AState = 0; // Switch connected to digital pin 2
int AStatePrev = 0; // Switch connected to digital pin 2
// B is IO 3
int B = 3; // Switch connected to digital pin 3
int BState = 0; // Switch connected to digital pin 3
int BStatePrev = 0; // Switch connected to digital pin 3
int buttonState = 0;
void setup() // run once, when the sketch starts
{
Serial.begin(115200); // set up Serial library at 115200 bps
pinMode(A, INPUT); // sets the digital pin as input to read switch
pinMode(B, INPUT); // sets the digital pin as input to read switch
}
void loop() // run over and over again
{
AStatePrev = digitalRead(A); // Switch connected to digital pin 2
BStatePrev = digitalRead(B); // Switch connected to digital pin 3
delay(60);
BState = digitalRead(B); // Switch connected to digital pin 3
AState = digitalRead(A); // Switch connected to digital pin 2
// Handle button "2" presses
if (BStatePrev==BState)
{
if (BState == HIGH)
{
Serial.println("B");
delay(60);
}
}
// Handle button "1" presses
if (AStatePrev==AState)
{
if (AState == HIGH)
{
Serial.println("A");
delay(60);
}
}
}







