Marking? What marking?

19:06 30 May, 2013

I have heard about of couple of cases this week involving farmers abused by patent owners. I am sure that the lawyers involved looked at this: “Except on proof that the infringer was notified of the infringement and continued to infringe thereafter, in which event damages may be recovered only for infringement occurring after such notice”.
That is from: This Cornell Law Posting
So where on that seed was Pat. nnnnnnnn?
Just saying.
I am not alwyer and do not aspire to be but lawyers and judges are expected to be able to read.

Oh, if the infringer had made best efforts to avoid buying the “falsly unmarked” product, how can he/she be an infringer? Is he/she entitled to compensation for frivolous suit?

Who pays? You pay.

10:42 31 March, 2013

Once upon a time I went to a Halloween costume party.  There I met a man dressed as a gangster with a woman in a rabbit (as distinct from a bunny) costume.  Nice couple.  He was an IRS auditor and we talked a bit about IRS and that kind of thing.

The take away from that conversation was “if you are non-compliant, never brag about”.  The vast majority of people investigated are under suspicion because a neighbor called them on it.

Back when the Presidential race was on and Wanna-be King Obama squared off against RichBoy Romney.  A controversy was that Mr. Romney would not make some of his older returns public.  Hey folks, put your mouth where your money is (Washington). They could have called him a tax cheat and gotten him audited.

The fact of the matter is that most wealthy folk can afford to hire very good accountants and very good lawyers to advise them.  Why do they need good lawyers and accountants.  *BAD TAX LAW*

Who makes *BAD TAX LAW*? It starts with the House and is amplified by the Senate. Why should YOU have to pay someone to do your taxes? Any tax that complicated cannot be fair. Period.

The Republicans say they want to reform the tax system. So do the Democrats. Republican voters mostly want lower taxes and smaller government. Democrats seem to want larger government and the higher taxes required to pay for it, as long as it is perceived that someone else is paying.

My prediction is that even with sequester and all of that nonsense, taxes will go up and you will pay more, regardless of you income.

FLTK – Fast Light Tool Kit

16:59 22 February, 2013

While working on an earlier project, I ran across a very good, portable window/widget tool kit. It goes by the name of FLTK (pronounced full-tick). A good tutorials exist here (note especially the “label pitfall”) and here which will teach you the basics. There are example programs in the full install found at the FLTK website along with an excellent programming manual. Documentation for previous releases is available. Ubuntu 10.4 LTS comes with FLTK 1.1.0.
When I began a new project, I decided to self-educate and used the second, pdf, tutorial above. I quickly worked through the examples until I got to 16. Handling mouse events part2 for the follow-the-mouse drawing program where I ran into a problem with the offscreenbuffer functions. I searched a bit for solutions. After reading more tutorials and more manuals, I discovered that the problem is that the example is omits several required includes. <stdlib.h> and <stdio.h>  are easy. A bit more difficult is #INCLUDE <FL/x.H>. This include provides environmental information for X11, in particular the definition for FL_Offscreen. These details are covered in Appendix F Operating System issues and briefly at “Drawing Things with FLTK” in the later on-line versions of the programming manual. But x.H may not be apparent at first glance. A corresponding win32.H also exists but including x.H will pick up the correct info if your environment variables are set.
With those three additions, the example 16 program compiles and runs.

Hacker Attire

16:57 31 December, 2012

Hacker in balaclava and black sweater using laptop

Hacker hacking

I was taking some “security training” for work. When they referred to “hackers”, the training showed “hackers” dressed in dark clothes and balaclava’s. I had seen this with other web sites. Since it is on the web and pervasive, it must be they way hackers really dress. I wondered why so I e-mailed my son who has degree in computer science and often is well informed on technical topics.

His response:

Dad,
This is a carryover from the days before surface mount technology, when computer hacking required the use of a soldering iron.

The jumpsuit protected the “hacker’s” body from stray molten solder. The balaclava, which you’ll note covers the nose and mouth, protected the individual’s lungs from harmful fumes that can be released during soldering, including lead, arsenic, organobromides and resin acid particulates. Some of these gases can also cause contact dermatitis, a risk that is also abated by the jumpsuit.

Of course, modern-day hackers can simply exploit operating system design flaws to perform their work. The dress is now ceremonial, though its use is required in the EU (some laws are slow to change!)

Hope this helps…

Yep.

20:57 15 November, 2012

Forward.  Ennui! You voted. Or perhaps did not.
Here we are just about the same
Foggy little fella, drowsy little dame
Two sleepy people by dawn’s early light
And so much in love, so much in love
Too much in love to say good night.

Ennui!

18:32 4 September, 2012

The GOP bumper sticker.

Forward., ?, ¡#%@!

12:14 31 July, 2012

Today’s WSJ called to my attention that Barack Obama’s re-election campaign has adopted the slogan “Forward.”.   I read this initally as a command as in “Forward, March!”.

Picture of Ship's Engine Telegraph set to Ahead Dead Slow

Ahead Dead Slow

Of course the problem here is that the part of the command that results in execution is missing.

 

Next I tried reading it as “Forward (full stop)”.  While this might seem like something from a ship’s engine telegraph, it is not. And somehow I do not think that this is what the campaign had in mind.

If we read the complete sentence literally and diagram it:

 

(implied "I",
"you", "we", or "they") | forward | (implied object)
                        |

Here, the ill-defined actor subject adds to the confusion of who is doing what. That sounds familiar in this President’s administration.  But what is clear is that the implied object has been misdirected. Perhaps it has a future, eventually being delivered, that is if the Post Office survives bankruptcy.  I suspect the more likely result is that the false promises of the current administration and Congress will be “lost in the mail”. Again.

More likely, a continuation of the “blame someone else” and “kick the can down the road” that have become the hallmark of Barack Obama’s presidency. Three years into an admistration, it is past time to be blaming your predecessor. The president should be leading Congress, but both parties in both the House and the Senate seem to have no strong desire to follow the President off a fiscal cliff.

I am reminded of the slogan of Peabody, the dog who had a time-machine and a pet boy, Sherman, in the “Rocky and Bullwinkle Show” feature. The two would shout “Forward…into the past”. I say, “Oh, no, not again, not 4 more years”.

lex and yacc Continued

12:41 17 June, 2012

Follow the link for an excellent tutorial ref1 on lex and yacc with some sample code. I will refer to this as ref1 in comments below.

Another lex and yacc tutorial with sample code . This post is based substantially on this second tutorial and the examples in the sample code.

A number of examples are provided. For each example, a script, say example1.compile, is present after you gunzip and tar x-tract.
chmod 755 the *.compile files to make them executable.
cat or edit each example, example4.l is the lex file and example4.y is the yacc file.

I have never been a fan of exercise, either in the gym or on paper. Give me a real problem or a real event to contest any day. But exercise is sometimes a necessary preparation for building strength and agility. Recalling Harvey Wagner and the “Mind Expanding Exercises” in his textbook Principles of Operations Research let us call these:

Stretching Exercises

Note: Do all of the examples. Stretching exercises extend but do not replace the tutorial.

0. Download the sample code. Gunzip and expand it. Mark the executable *.compile scripts and execute the example1.compile script. Resolve any knowledge gaps.

1. Build example2 and test it. Now enhance it so that it prints “MIXED” if the input is alpha-numeric, “NUMIXED” if the input is alpha-numeric with leading digit, “NUMBER” if all digits, “TEXT” if all letters and if the input is EXIT, Return 0.
Did you get a message like ex2.l:9: warning, rule cannot be matched on the lex execution? Why might it occur? How can you fix it if it does?

2. Build example4 and test it. What usability problems would you fix? Suggest 3 usability or reliability improvements. Create a version that implements the improvements.

3. Now create a version of the example4.compile script that includes the yacc “-rall” switch. Execute it and examine the y.output file. Do you think that the “-rall” switch aids understanding? Debugging? Checking? Testing? Designing?

4. Review the tutorial at ref1. Repeat exercise 3.

5. Create a word counting program using lex (flex). Nobody expects the Inquistion. Compile and test it.

6. Run example4.compile. Examine y.tab.h.
rm y.output, lex.yy.c, y.tab.h and y.tab.c. Run example1.compile again. Which files are created? Make note of the size(s).
mv or cp lex.yy.c to preserve it.
Run example4.compile again. Which files are different?
diff the preserved version of lex.yy.c and the just created one. Are they more or less different than you expected?

7. Run example4. Use the following inputs (from the tutorial)
heat on
heat off
target temperature 22

What were the responses?

Try “heat foo” – what is the result?
Try “target temp 99″ – what is the result?

Rate the generated program on a robustness scale of 0-3.
Rate the generated program on a user friendliness scale of 0-3.
Explain how this experience will influence your future program designs.
Explain how this experience will influence your future program testing.

8. Between earlier examples and example4, can you explain what changed that allowed the removal of -ll (libfl if flex how can that be?) from the link specification?
What did yacc provide that allowed this to happen?
In your intermediate files, can you find the line number?

9. diff example4.l and example5.l
diff examle4.y and example5.y
Demonstrate your understanding of yytext and yylval by explaining the origin of their content and when it is created.
Further explain yytext and yylval as “c” variables in the generated program.

10. diff example4.y and example6.y
Explain your understanding of the origin of variable $2
Explain your understanding of the origin of variable $3
Explain why the specifics of $1 $2 $3 etc. are not that important.
Explain why the shared usage of $1 $2 $3 is important to the shared, generated code.

10. Explain the lex<->yacc efficency trade-off on the choices made for HEAT ON and HEAT OFF.

11. Run example5.compile and provide inputs from 7 above.
Describe your user experience:
a. Program correct?
b. Program robustness, security, reliability, resistance to failure.
c. Program presentation/beauty/ease-of-use/understandability
d. Program efficiency.

12. As a user, rank the factors a-d above. Check with your associates. Ask visitors to your home to evaluate. Ask strangers to evalute the list.

13. Create a version of example5 that is more user friendly. Consider recovery from errors, ease of use, lack of training, carelessness.

Now that you are warmed up, Wikipedia [Bison] and ref1 present calculator programmes. Build each, test and evaluate, share a blog post that compares and contrasts the available examples.

lex and yacc

18:51 12 June, 2012

If you lift the lid on the engine compartment of your car (bonnet to English-speakers, hood to Americans), you see a complex arrangement of TUBES, wires, boxes, containers, and mysterious objects. Worse, they may be concealed by covers, bundles and conduits. If you have a friend or perhaps classroom instruction, with the help of a readable manual, you can find your way and check your fluids, look for damage, identify the source of a mysterious new noise.

Should you decide that there is a problem that you can fix yourself, you will go to your tool box to choose the right wrench (spanner) or screwdriver to fix the problem.

Linux is not different. And the tool box is vast.

Or perhaps you wish to make something new and different. Linux (and Unix, and all that goes before) provides a huge tool box (the USPTO pretending to not know (“I am not knowing” (has this been outsourced too?)). The great advantage of the Linux distributions is that they are free (as in freedom) and free or inexpensive (in cost). When you receive benefit, give back.

In my home tool box, I have a basin wrench . Cost per use $5. It allows one to reach into the inaccessable space between the wall and the basin to loosen or tighten the nut that holds the faucet to the basin or the supply-line to the faucet.

LEX and YACC are just such tools. Like many tools in the Unix/linux world, the have a specific application. And they are absolutely genius in what they do.

“Proper tool for the proper job”. Each tool does one thing very well. Something else? That is why there is | (pipe)

If you are not trying to create a programme or solve specific problem, you may already know every thing you need to know.

lex – a tool to generate (in conjunction with yacc) C code for a lexical scanner
yacc – a tool to generate (in conjunction with lex) C code for a grammer interpreter.

In naive terms, lex – what do I see, yacc – what do I do with it.

Think about this problem: You are trying to create program that “understands” specific input words and is able to act on them.
lex is the tool that can do this. The “shorthand” description to lex and the C compiler can create a program for Linux that scans the input stream for specific values, and generates specific results.

If the inputs are more complicated, you may need to have the program interpret as an example “what to do” “thing that it is done to”. This is where yacc come in.

To add to the confusion, lex is the classic Unix program, flex is the Linux equivalent. Mostly compatable but subtly different.

Similarly, yacc is a Unix program, bison is the linux equivalent. Fortunately, flex and bison have compatability so previous knowledge and program source is not rendered valueless.

More in a future post.

Credit where credit is due

18:03

I could send the payments for my bills and snag my own website renewals but wife takes care of the former and my son takes care the latter. And my life is lighter. Thank you.