Saturday, October 3, 2015
Vaadin
Saturday, September 26, 2015
Aspirations
For every dream there is a reality check, but for every action there is an impetus.
When OSGI-on-glassfish was the new hotness at my company, I spent 2 weeks trying to figure out how to get Smooks and Camel to load a flat file though EJBs. I rewrote it in 5 hours on Friday with SQL*Loader including an hour for load time.
Last week I spent 3 hours helping get a solid drools deployment done. I was only tertiary help. The code was written, but the deployment was just not there. If only they were just pulled from a DB....
I spent the rest of my time on Gatling. I am really new when it comes to Scala and I went down a lot of dead ends trying to load test a complex Vaadin app. I think I have an approach now but I'm still working on creating realistic workloads. 2 weeks and all I can do is click a button.
I just wish Vaadin came with a simple tool like SQL loader.
Blogger for Android sucks. It deleted text and now won't type. I finished this with something about golang being simple.
https://splice.com/blog/golang-improved-simplicity-reduced-maintenance/
Sunday, September 13, 2015
Making peace with interfaces
Sunday, September 6, 2015
Re-implement would make the same mistakes
Sunday, August 30, 2015
Bean mapping
I taught again this week. I don't know why o do it. Probably because I feel productive.
I worked on bean mapping. Having a layer protecting your exposure to third party helps... but at what cost?
I'm building that layer now for our intf with WebLogic. I don't quite understand why it was used in certain places but such is life.
Building it after is in that case of: it works, why spend time on it????? And the answer is technical debt. Startup costs, security costs.
People try to tack on lower cost of future maintenance but I don't buy it. If your car works, and someone offers you a service saying: "I'll replace your air intake manifold for $1,000, it will save you wear and tear on you engine" I'd say, "Hey. There were smart people testing and designing this originally, where is your proof yours is better?"
So we get layers. The most important thing in our program is our capability of changing out our ORM if you looked at lines of code.
The things I want to change are to go stackless; use akka, or vertx. Where is that bean mapping capability?
Web layers tell you to pollute your beans with json, request args, and post method mapping. DB layers tell you to pollute your beans with column, table, and join information. Service layers tell you to pollute your bean with validation information and XML information. So we end up with bean mappers.
I like raw java mappers (static converter utils) for the task. Orika, Dozer, w\e just add bad, half implemented DSLs to learn the edge cases for. The java converter is easily updated and doesn't require anything from either layer other than setters.
Saturday, August 8, 2015
Ubuntu time
This week was a little all over the place. I helped debug jpa queries(equals in jpql is case sensitive. Why would you expect it not to be???) I helped tighten up ssl on IIS6.(5 registry keys to create? Really? I hate that system config location is the same spot as app config locations. Linux is no better with /etc...) I wrote 126 java interfaces. (Daos for a very large web service). I wrote Ruby to spit out java for the osgi services that needed all those interfaces. I learned about gradle and wrote a dependency downloader script. I used that to compare cxf bundle (58 mb with a bunch of jars) and metro osgi (38mb with only a few jars.) Metro also looks more promising because its the jax ws reference implementation. I learned about dependendency resolution with scr's @Reference. I learned about enRoutes "compile-only" hack to make sure apis are pushed out with an implementation and never included in an osgi runtime alone. ( you have to add the api package to exports in bndtools view of your provider project's bnd.bnd and it will copy the class files. It's a bit too magic for my taste but whatever)
And I went in for 4 hours (3-7pm) Saturday so I could install Ubuntu on the server I bought. I'm a bit worried about weblogic... But it will force me to finish the bamboo deployments on check-in.... Hopefully it will force me to finish the weblogic spi jar to wrap our weblogic dependency as much as possible...
Also I need to write a basic telnet network stack for LVM. That is ULTRA dumb that you need to be physically at the server to enter the LUKS pw to decrypt at boot time. Like. WTF. I think I saw some solutions but they seem old.
Saturday, August 1, 2015
When the boss skips town
This week my boss left town. A patch release went in but needed a patch release itself. That also went in.
We have an intern and I didn't quite know how much freedom to give. We deploy on WebLogic 10.3 so there are limitations with what one can build. Also my experience with that platform enables me to see issues beforehand.
Additionally, I came up with a deployment idea. The intern knew nothing of ears. I am also struggling to explain mocking, as I just read the tutorial myself. The main algorithm of the app I came up with as well. I even just now writing this came up with an idea for a DISPLAY_WHEN column that is a velocity template to determine if a question is displayed or not.
In other news, I've been working with bndtools on Eclipse Mars. I've been trying to do it right: interfaces with javadoc and unit tests will be mockito like the intern is doing. We will see how much that slows things down.
Monday, July 13, 2015
When Spinning Plates Crash
- It's maven's SNAPSHOT.
- It's svn.
- It's ongoing poor deployment practices.
- It's slow corp machines.
- It's corrupted outlook pst files.
- It's rushed integrations with no real transaction support.
- It's huge static custom css
- It's 100 degree heat walking to and from work
- It's interviews taking 90 minutes.
- It's bamboo's not latest branch version but current repository version.
- It's the COMPLETE LACK OF AUTOMATED TAPE BACKUPS.
- the list goes on and on and on and on
Saturday, July 4, 2015
When You Bungle a Deployment
Ounce of Prevention
As senior reviewer of code, it is my responsibility to review all incoming changes for possible performance hits.Obviously bad:
session.addAttribute(new UUID(), new LargeXMLTree())
not so obviously bad (but essentially equivalent)
< ... rendered="#{conditionforsomelargepage}">
<a4j:include viewId="#{somelargepage}" />
</ ... >
For new code, I made sure that the somelargepage was blank.xhtml if rendered was false. I didn't change the old pages. What I didn't realize (this release took 8 months from inception to get out the door, I forgot some changes alright?) was that old pages used to be included like < ... rendered="#{conditionforsomelargepage}">
<ui:include src="#{somelargepage}">
</ ..>
Which isn't bad at all. Unless you have ui:debug defined anywhere, in which case it is.Pound of Cure
It's hard to tell your servers are supersaturated. The code worked fine before. We have not enabled new UI features yet. It never came up in test. The logs show different errors each time a server goes down. Servers are going down once every few hours. What happened?We have no response time analytic capabilities. We have no baseline for time spent in gc. We have no way of telling session sizes in prod. We have no way of telling if this is a rogue action or a rising tide. We have no way of telling if this is a app memory bug, or a server configuration. We have no load testing capabilities.
Nightmare. We had hints though. The servers would be fine with no errors for a few hours until west coast people signed on. The logs would show nothing except for db timeouts of very basic queries. It happened around the same time each day. Eventually we rolled it back. Time wasted: 1 week.
Wasted Effort
But we got out of it. Idea one was to write a service to determine session size. *Heavily* modified jamm was the answer here.This was a waste of time and did not contribute to final solution. Hey, I have a jsp that I can thread into a war now that will give you session size though. Not all bad. Time wasted: 1 week.
Repro Found
Step two was to write selenium tests from scratch. 1500 lines of code and one hijacked OCR server later, we were able to reproduce the same server behavior. Time spent: 1 week.Using a trial version of YourKit, I spent 6 hours running the same selenium test case and taking snapshots. By the numbers: new code spent 156% the memory per session that the old code did. New code did not change app memory used (retained - session). I cannot stress how much this overall view was needed to prove that it wasn't a leak, or application memory bug.
Solution
After you can reproduce a problem, it becomes almost trivial to fix. You can literally just tweak at random until you see the problem go away.Of course, I knew of an optimization beforehand, having it applied it to the new code. So the fix was not random.
Post Notes
I wrote many emails about how our testing infrastructure had holes that let this problem go though. I wrote many more emails about the money and time costs of fixing the infrastructure, and the pros and cons of different ways of fixing our software development life cycle.Overall, it was one of the more interesting tasks I've had, as "proving" is in my DNA as a maths major.
Final lesson: large JSF apps simply do not scale.
Saturday, June 27, 2015
The nothingness abyss referred to as Richfaces 3
- a4j has bad xml tree code. like, who hired that *** excuse for a *** *** * and ***?
- If you are going to open a new browser window, and expect both windows to be used, put the code for the new window in a different war.
- richfaces programming style is jquery 1.3, but the thought process is pre-1.3. In case you forgot, or were still in diapers, jquery 1.3 was when they invented feature detection [1]. Thus trying to support any browsers that did not exist in 2009, you are going to have a Bad Time.
- As far as I can tell JSF2 ppls decided to completely ignore the work jboss put in to adding ajax to JSF[2]. I know that's the choice I would have made.
- xml is parsed and traversed in tree every request (ajax included). Today in 2015 we know that xml is bad because its slow. In fact, XML surpasses other data exchange formats in almost every other category: schema expressiveness, built in query language, reference types. But it's slow. XPATH is slow. Parsing on server is slow. Parsing on client is slow. Reading is slow. Writing is slow. Diffing is slow.
- because xml is slow, and jsf wasn't made for ajax, things are fragile. too many events and it dies. too special characters and it dies. too specific re-render instructions and it dies. two forms and on ie and it dies.
- Special characters: if you send valid html escape codes, richfaces server will parse them fine. If you send them back, they will display fine. If you a4j rerender them it will die. silently. unless you change your code, add an a4j:log, you can see xml parsing errors on the client. all browsers xml parsers are different in which characters they accept.
- WYSIWYG editor with custom css'd templates. oh man don't go there. Every browser treats keys differently (Enter is <br> or <p> or <div> depending on which browser you are using) Every browser treats whitespace differently. 400 line javascript monkey patch sitting on top of our editor for that right there. The 10x-law-of-demeter-violating-hack[5] discovered and written by me in 4 hours thank you very much. Debugged corner cases over the course of 3 weeks and I still can't get enters to work when cursor is at top level and no text has been written. I think richfaces just eats 'enter's.
- Richfaces eats 'a's. You just can't do it. You are in a pick list and want to select all? you are in a pick list and you SIMPLY WANT TO SCROLL TO THE 'A's. Nope. Richfaces eats 'a's.
- if you have one view root, and you want to talk to another view root, you can't. you encode your message in the url and make another request, creating another instance. Or you create a session scope or above bean that will serve as message communicator. Or you can hack javascript into giving you references to other views which give references to other richfaces objects.
- If you open up the js debugger, you will see an exception ONLY SOMETIMES that A4J.log is not defined. it is defined. Richfaces defined it everywhere. Twice. You defined it everywhere. Twice. js debugger will pause where the exception is thrown and it will be defined. but the exception doesn't go away. It's just something you have to ignore.
- Lets say you have a custom page you wrote in a day. it's decently sized, couple hundred lines. For some reason, a4j requires up to 85MB allocations to process this. I don't care if you don't have backing beans, I don't care that you are not storing anything in session. a4j just allocates crap per session. Of course it's all garbage at the end of the request.
- What the above means is that each of your servers will have a hard and low limit of "in flight" requests it can process. This past week I've OOM'd[4] an old 32 bit jrockit weblogic 10.3 server instance with just 10 concurrent requests to a large richfaces 3 page.
- Richfaces 3 is ABANDONWARE [3] -- "old and unsupported"
- Any javascript error while in an oncomplete= is invisible and swallowed.
Monday, February 13, 2012
Your first discussion when you sit down to make a game.
HCI
What are the Humans?
What are the Computers?
What is their Interaction?
Acceptable answers:
I'm going to make a game for the masses with millions dollars backing me on all modern consoles.
I'm going to make a game for my friends and Reddit to play on their computer.
I'm going to make a game for /b/ that they will jack off to on their tablets.
I'm going to make a game for Mrs. Chandler that shows how the expressive interaction of interpretative dance
can be integrated with the assistance of a mechanical third party to create something that is worthy to be
called literature.
I'm going to make a game for everyone on the internet that will incorporate drag and drop features in novel ways
that augment your brain with gluing gooey gluey goodness.
I'm going to make an in your face absurd machismo beat 'em up that contains many new additions to the field
such as automatic illustrating techniques that actually work.
I'm going to make a game on PC that makes you wish you were dead, or at least made you want to kill all those to
toture others.
I'm going to make a game that is like bill and teds excellent adventure but with more things to learn because learning is fun.
I'm going to make a game for runners/cyclists/gazelles that gives them another reality to be in while doing that exercise of their
choice. It would be like noby noby boy in it's social pointlessness.
I'm going to make a program for programmers to drink beer and program together.
I'm going to make a program for dnd nerds to drink and program together.
I'm going to make a beer proof keyboard that works well.
I'm going to make a touch corded keyboard.
I'm going to make a VIM for corded keyboards.
I'm going to make a homeless shelter that teaches people how to program. Program for food.
The programmers will need to complete lessons based on fingerprint? eye scan?
I'm going to make a map based games to end map based gaming.
I'm going to write a intuitive soundboard database (trees).
I'm going to write a game so passive it might as well be television. You control whatever little
you control with your eyes.
I'm going to write a game that makes political bullshit impossible}}}}.
I'm going to write something where working isn't interacting with the machine, but getting whatever you are doing done.
I'm going to write a game to create meaningful connections.
I'm going to write a game to make people feel love.
I'm going to write a game that will make the new culture seem obvious.
I'm going to create a pen that records where it's been written to. 3d map of the pen tip.
I'm going to create a touch corded keyboard on the steering wheel of the car.
I'm going to create a portal for thinking about your program : data flow? interface problems?
I'm going to create a game to make Mel love Vash more.
I'm going to make a game to make me feel less guilty about being white.
I'm going to make a game to help mathematicians think.
I want to create a game so that using your brain does not feel like work.
I'm going to make beer proof and homeless people proof keyboards.
I want to give my life to a cause.
I want to take poetry.
Monday, January 16, 2012
Poverty Part 3.
Well, the corporation fits that bill if you convince yourself your company needs to exist. (Non-Trivial task mind you)
The camaraderie comes from the difficulty of the task. People existing close to each other completing things are just going to become friends. If not then.. I don't know. Organizing friends is a difficult task. "Culture" corporations call it. You have to fit with the companies or you just won't get in the door.
Gangs I call it sometimes when I'm feeling down.
Step 1. Make prison's more mother fucking anti-social. Putting all those people together? Seriously? Colleges charge $5,000 per semester to do this to your god damn highschool kid (dorms) and we are giving the experience away for free to those who committed acts against society?
You are setting this up to say: your regular society sucks, but if you get inside you will be around people all the time. The fuck is that about?
Step 2. Turn these missions into a more social event. I see people lining up at the mission and I'm envious of the large groups of friends that interact while waiting for food. Of course, when I'm closer I see they mostly are angry at each other. It's hard to like other people while poor. This is why you need the other two elements: getting things done, and being needed.
Poverty. Part 2.
Oliver Gospel Mission takes a Man on the Mountain point of view. The Cathedral.
I think Bazaar. I think Gas Stations.
Ponder for a second: what would life in this country be like if to operate a gas station, or to sell foods with saturated fat, or to sell cigarettes, you must operate a mission for the poor in the same building?
Approved missions:
1. Food Kitchen.
2. Drug rehabilitation clinic.
3. Job hunting office.
4. Volunteering corps office.
5. Beds.
6. Elderly Care Centers.
7. Veterinary Services(Seeing eye dogs get sick too).
You would design each approved mission in legalize so they would have roughly the same operational upkeep cost, and maybe even say you must give 10% of the station's profits to supporting this mission.
But we didn't take very much from the Army here. The task is to take the Army in mind as well, otherwise it just won't stick.
Poverty. Part 1.
I want to seed some of your thoughts tonight with 2 things.
For the first seed I want to bring you to the south-east corner of Assembly and Taylor in Columbia South Carolina: the Oliver Gospel Mission.
http://www.olivergospelmission.org/
Your thought starts here because for 120 years they have been doing it right.
Welcome to the Oliver Gospel Mission. After 123 years, we are continuing our commitment to reaching out to the broken and homeless in Columbia. We have renewed the emphasis on equipping them to become spiritually fulfilled and functioning members of society who are making a positive impact on the quality of life in the Columbia area. For example, men who were previously unemployed are securing jobs, even in these tough economic times. Others are being reunited with estranged family members. Above all else, we continue to provide hope to people who have lost all sense of significance in a society that puts such a high value on material success. I am confident that as you browse our site you will be surprised by all we’re doing in the community, and find ways in which you can help. We encourage you to contact us for a tour. We’d love to have you visit the Mission and hope to hear from you soon!
-- President/CEO message
Re-read that message as if you were Hermione, look between the lines. Good progress is easy to find, as are ideological holes. Good Seed.
Second seed for this genetic experiment of a discussion we will find at 1225 Bluff Road, Columbia South Carolina. The National Guard.
Your thought must go here because since Neolithic times armies have been doing something right.
Now I know what you are thinking, It's the God Damn Army Bill. They fucking kill people. These are all murderers that deserve nothing more than death themselves. Every dollar spent on defense is a dollar stolen from someone's dinner. Etc.
But I've brought you here for a reason.
This one you really have to put on your Hermione glasses:
The Guard answers the call, at home or abroad.
Share
The incredible versatility of the National Guard enables its troops to respond to domestic emergencies, combat missions, counterdrug efforts, reconstruction missions and more—all with equal speed, strength and efficiency.
Whether the call is coming from the state governor or directly from the president of the United States, Guard Soldiers are always ready and always there.
You'll serve your community, your state and your country.
As a Guard Soldier, you can expect your primary area of operation to be your home state, following the leadership of your state adjutant general and governor. This may include community efforts, responding to wildfires or floods. Or, it may include serving overseas, training foreign forces.
You will also be prepared to mobilize when directed by the president. This may include overseas service or domestic, such as serving along the U.S.-Mexico border.
So, what does the National Guard do? Whatever is needed, wherever it is needed.
If you couldn't quite do it for that last one: I'll help. The first is the last line: "Whatever is needed, wherever it is needed." You are *needed* Charlie. We need you. I need you.
Doesn't that conjure up a fuzzy feeling... Dwell on that feeling for a little bit.
The second key is the rest of it. Describing "stuff to do." You'll be productive! Rob always described it as an itch he had.
Dwell on how you feel when you are getting things done contrasted with when you are not getting things done for a little bit.
The third key is entirely implied. You ask any soldier: Why did you fight? and they'll respond for my friends. For the people right next to me.
Community.
Not the community that people like to think of as their city. But real community. Real brotherhood. Camaraderie. Friendship.
That's it right there. You want to help mommy with the dishes? Do it. You are needed.
Tuesday, February 22, 2011
This one is bill.
What I think Stewart is advocating for (or maybe this just just what I would advocate for so I'm projecting) is that:
We advocate with honesty and sincerity. Don't misrepresent the truth to suit your own viewpoints and don't pretend to be a ludicrous parody of your own beliefs in order to force the discussion in your direction. Ask for what you really want. If you want an end to partial-birth abortion don't say you think all family planners are murders and should be on death row. If you want better financial regulation don't say you want bankers kicked out of their homes so that victims of fraudulent foreclosure can live in them.
We treat our opponents fairly. Avoid ad hominem attacks when they aren't relevant to the topic at hand (the almost never are).
We seek to maintain a productive dialog. Is your discuss convincing your opponent ? Is it convincing an undecided observer ? Is it rousing those in agreement with you to take productive action ? If not then you're wasting your breath and creating meaningless polarization.
We try to understand an opponent's perspective. Do I think our involvement in two wars over the course of a decade has turned out to be foolhardy and ill-advised--yes. Do I think many of the acts we've committed were probably criminal--I do. Do I think ulterior motives were involved--it's very likely. However, I don't honestly believe that anyone in power went home and told their SO, "Baby, I think we've found a way to make money by killing Ahab." Relying on dark and vile imagery to paint our opponents as bad people is intellectually shallow. Most people are not truly evil and even those who are could be prevented from doing bad things if we do what's needed to solve the elementary systemic flaws in our political institutions.
None of those points require advocating a position any more moderate than the one you honestly hold. It simply requires that you seek it in a way that's honest and productive and is more interested in moving the dialog forward than in "winning".
As a mathematics graduate student in the boonies, I'm going to counter point here on behalf of Andrew Jackson's mobocracy. I don't have time to read the Bush books. I simply do not have time enough to keep up on being literate when it comes to any topics The Daily Show deems important.
In college, we talked about how to "read texts." Experiment with which perspective you take when you read new ideas. Look for things missing, look for hidden discriminations.
However, modern speech writers took such a large shit in my mouth that I can't do that logically. It's impossible. I literally do not have enough processing power to consider everyone's problems. In New York City a few weeks ago I had this carnivale experience where ambulances were running and all the hundreds conversations on the street kept going. This was right down the street, someone was obviously hurt but these people have been convinced that this is not an issue for them; wall street is, Wisconsin is, Conservatives are, their job is.
Everyone has a voice, no one has, or is getting, a heart.
Tuesday, September 14, 2010
Flame on.
http://groups.google.com/group/sage-devel/browse_thread/thread/cbb7a39575870636
> Do we really need Cliquer in Sage?
>
I know this comment will be pointless, as I am pretty sure those who agree with Dr. Kirkby only want a Mathematica clone for solaris (based on his recent posts) but I'm going to go ahead and flame anyway.
I am not able to count how many times I've been in a combinatorics lecture while an algorithm using max Cliques to solve the problem at hand was casually thrown into the mix.
I am also not able to understand why Nathann received such harsh backlash for pointing out something so obvious.
I am around professors every day who use C and hardly ever check their malloc's. These are the kind of people who have written full chapters in the CRC handbook of combinatorial designs, and books(plural!) on combinatorial algorithms.
I find it revolting that there would exist math software that would cut strong usable features based on code quality. This kind of policy does NOT promote code sharing among researchers.
long live purple sage
Saturday, April 24, 2010
New Direction
Thursday, March 18, 2010
Help a newb out with Design Theory
Let $P^*=(P,\subset)$ be the poset (P is also an abstract simplicial complex)
formed by the following construction:
1. $X \in P$.
2. $B$ is a subset of $P$. (call these facets)
3. If $Y$ is a subset of $b \in B$, then $Y$ is in $P$.
With poset relation subset.
Obviously, all $t$ subsets of $X$ are in this poset, and they have $\lambda$
facets (blocks) that contain them.
Define a new parameter $c$.
Let$ t\leq c\leq k$.
There is a smallest $i$ such that all $i$ subsets of $X$ are in $P$,
but not all $i+1$ subsets are in $P$. Call this smallest integer $c$.
For complete designs, $c$ is $k$.
Does this parameter have a name? does it have a use?
Without loss we can say $t$ is the greatest such $t$ for this design. If $t
Monday, March 1, 2010
First recursive function I've written in years.
recurse:=function(G,B,i,g,f)
local j;
if Size(g) = (i-1) then
if Size(g) = Size(B) then
return f(g);
else
for j in Combinations(G,B[i]-1) do
return recurse(G,B,i+1,Concatenation(g,[j]),f);
od;
fi;
else return;
fi;
end;
global_array:=[];
fun:=function(G,B,g)
local gset,glist,difflist,gcopy,x,L,i,j,pos,idealdifflist;
#TODO Implement FindL, code's written, just wrap it up
L:=2;#FindL(G,B);
gcopy:=StructuralCopy(g);
gset:=Flat(gcopy);
glist:=List(G);
difflist:=ConstantArray(0,Size(G));
idealdifflist:=ConstantArray(L,Size(G));
idealdifflist[Position(glist,One(G))]:=0;
# if Id is not any one of the diffs;
if Positions(gset,One(G))<>[] then
return;
else
for i in [1..Size(gcopy)] do
Add(gcopy[i],One(G));
od;
#generate difflist
for i in [1..Size(gcopy)] do
for j in Tuples(gcopy[i],2) do
pos:=Position(glist,j[1]*j[2]^-1);
difflist[pos]:=difflist[pos]+1;
od;
od;
fi;
#verify difflist
if difflist = idealdifflist then
Add(global_array,g);
fi;
end;
Sunday, February 21, 2010
Splines (bill theory of OCR)
- measure correspondence of overlapping segments of splines.
- Create a 3 dimensional graph with the z being the first derivative of the spline, another with the z being the 2nd derivative, and another with the z being the 3rd derivative.
- Assume there are building blocks of shapes, break each spline into it's fundamental composition of shapes.
- the input is also not just one spline, but could be several different spline interpretations.