Search
|
Stephen’s recently been questioned a bit about his email address validation regex – which has a few problems… Notably, it doesn’t allow for addresses like rob@uk, which I’m assured once existed (although I don’t believe it still does).
He wasn’t aware of any TLDs with MX records – so, of course, I had to set out to make a list. And here it is! The following TLDs (all ccTLDs, though I checked all the gTLDs I could find too) all had MX records, as of tonight
.ai – Anguilla
.as – American Samoa
.bj – Benin
.cf – Central African Republic
.cx – Christmas Island
.dj – Djibouti
.dm – Dominica
.gp – Guadeloupe
.gt – Guatemala
.hr – Croatia
.io – British Indian Ocean Territory
.kh – Cambodia
.km – Comoros
.mh – Marshall Islands
.mq – Martinique
.ne – Niger
.ni – Nicaragua
.pa – Panama
.td – Chad
.tk – Tokelau
.tl – East Timor
.ua – Ukraine
.va – Vatican City
.ws – Samoa
From Ronan Kirby’s write-up of Skycon, about my lightning talk at the con:
“Also, if anyone has a tape of this talk, there could be money made selling it to an energy drink company for commercial use.”
The speaker notifications have gone out, the schedule is on the website, and registration is open. ApacheCon US 2006 is getting closer, and although I won’t be able to be there (it’s the very first week of college, and I’m hoping to be starting my final year… Aargh!), I’ve once again gone and turned out some iCal files for those of you who will make it (yes, I ought to be packing to move back to Ireland, or writing that darn essay. Mneh, I tell you!).
It’s the same deal as last time, and if you’re bringing an iPod to the conference, I’ve also got instructions for importing the schedules to the iPod, and viewing them thereon.
The whole schedule – warning, this is big, full, and slightly scary looking! There’s an awful lot of stuff going on at the con!
The plenaries schedule includes plenary sessions, lunches, coffee breaks – anything that’s good for everyone, no ‘tracks’.
The tutorials schedule will let you know what’s going on for the first two days, although don’t forget the hackathon, your chance to get some really good work done in real time, with the people you usually have to play cross-timezone email-tag with
Like I’ve said before, this is going to be bigger and better than any other con going, so the ‘conference’ days are jam-packed. There’ll be five tracks all week long, and an extra all-Cliff, all-day special on the Friday.
The schedules for these are:
Room 1
Room 2
Room 3
Room 4
Room 5
Room 6
As usual, I’ll try and keep these as up-to-date as possible… If you’re subscribed to the iCal, you’ll get those updates automatically – if you’ve just downloaded it for offline viewing, or your iPod, you may have to resync closer to the con.
Remember to keep an eye on the wiki for things like BoF sessions, and if you’re planning a party, make sure to add it there, so everyone can join in the fun! Enjoy!
Laura Thomson came all the way from Australia to present the last talk I went to at ApacheCon – PHP/MySQL Best Practices – and for me at least, it was well worth her trouble. This was originally submitted as a tutorial, and was only converted to a talk at the last minute, so we were really lucky to have her!
Talk-lite – 45 mins instead of 3hrs
Design DBs & apps without big holes
Maintainance
Clear vision for architecture = good
‘Framework’ = trendy buzzword
Everyone has a different idea
Some frameworks lead to bloat, and make it hard to do simple things simple
No paradigm for frameworks = no help with maintainability, transferable code
skills
Have a clear & simple architecture
Easy to add to
Easy to explain to new people
Easy to remember now, and in 2/5/10 years
Database extraction = MYTH!!!
Changing PHP = easy
DB chosen based on features
DB extraction layers inefficient/slow/cumbersome
Data access extraction – PDO
Standardise on prepared statements – MySQL4.1
Templating languages (database extraction & frameworks also) – religious issue
Start simple, can’t help but adding features
Ends up with feature-complete languages, adds a layer of complexity = layer of
inefficiencies, something else to break
ARCHITECT FOR YOURSELF – presume that /you/ will be maintaining this in the
future
Don’t rely on server config – write the most portable code possible (security,
ini settings)
Design with security from the ground up – dispatch architecture = single line of
execution
CODE REVIEW – code quality++, make sure code is developed sensibly
Security audit – particularly with inherited/legacy code
Education, education, education – make it easy to do the right thing
Use error reporting – turn it right up on development servers
Aim to write code that doesn’t throw any notices
Turn error level down, or display_errors off, on production servers – attackers
can use error messages to make better attacks
Education – developers don’t know better
Code review from peer-to-peer, formal code review, mentor junior staff, read
commits
Developer education is a good addition to any security audit
Integrating against external data sources – don’t trust them
Don’t trust them to stay the same, be secure (injection attacks), be there at al
l!
Layer of abstraction++
Web2.0/AJAX/DHTML – JS heavy
Nightmare to debug and maintain
Firebug = God’s gift to JS programmers
Maintainability
Can someone understand your code, change & update it? Can /you/? Can the code be
extended/adapted?
“It’s just a hack” – turns into 10,000 lines of code, go back and look at first
500 – they’re buggy, hellish, breakable
THINK AHEAD
Developer ignorance is a big problem
For small project – write small code, be prepared to throw it away if it turns
into a big project
For big project, DESIGN FIRST
Problems arise when projects grow organically
Self-taught/junior developers aren’t the only ignorant developers
Lack of experience with teams/inability to adapt & be flexible
Lack of experience with developing significant (100,000 LOC) codebases
Lack of experience with someone else’s awful code! – #1 driver for developers to
improve is having to maintain someone else’s code!
Obfuscated code – crossword puzzle anyone?
Poor naming conventions – Hungarian notation = most abused naming on the planet
Abuse of define()
Seventeen layers of handoff
Reimplementation of built-ins/standard library functions – esp array functions
Failure to do /the simplest thing that could possibly work/
Premature optimisation – and it’s practically always premature! Obfuscates code,
usually without a good reason
Failure to comment /appropriately/ – “set foo to true if this is true” +
insanely complicated formula
Inline functions–
Nasty side effects – eg library file that includes executable code
Failure to read & fit in with existing code – use functions already in the code
where they exist
Not just about meeting a coding standard – it’s about THINKING!!!
That said – have and use a coding standard
No need to make from scratch – PEAR & Zend Framework have them. Good place to
start anyway
Use a coding standard from the start – nightmares happen if you try to do it
later!
Make rules awkward/hard to remember = no one will use them
Force millions of tiny files = performance hit
Apps Hungarian = just no
If you want something totally OO, use Java or Python
Formatting – use long form PHP tags
Space indents, or tabs, but everyone should use the same!
Comments – header block!
Single line comments for non-obvious code, TODOs, FIXMEs etc
Coding semantics – declare functions/classes in library files that don’t have
execution side effects
Code should run clean with E_ALL
Don’t use magic numbers, ternary operators, embedded HTML
Version control for anything that’ll take more than one week, one code file or
one developer – and most of those too!
Frequent commits – every conceptual change, additional functionality, every bug
fix should have a commit
Detailed commit messages – trac is a PITA, but trac++ still
DOCUMENTATION – any project beyond a certain size needs it. Organic code–
If you don’t document as you go, you never will
Aim for consistently produced lightweight docs – takes less time (so it just
might happen), and is quicker to read
TRAIN DEVELOPERS – code layout/design, sample code, explainations of
architecture/requirements – FEEDBACK
Hell is other people’s code – legacy code: the ninth circle of hell
You may never read all the legacy code
Parts of it are broken, were never used
If it wasn’t documented before, you never will
If it needs a complete rewrite, you won’t have time
You will have to deal with this. If not today, sometime soon.
Worth spending time to audit documentation, architecture, coding conventions,
what’s used, what’s obviously broken/fragile
Refactor as you go, with a lightweight plan in mind
Don’t get too ambitious
I didn’t get back to the room til about 4am today, so I was a bit scared to discover myself actually present and awake at this talk!
Show of hands – not many people using WebDAV
Distributed Authoring & Versioning
Authoring means lots of things, Versioning is a little misleading
Built on top of http – like network filesystem, can be used anywhere
Manage files on website/network filesystem for LAN
From the beginning, Tim Berners-Lee envisioned a read-write/collaborative web
Initially, marketing etc made it read-only, until the 90s, when wikis appeared
Web documents, calendars
mod_dav was 3rd party module for Apache 1.3, has been standard module since 2.0
Amazingly easy to configure mod_dav to create a DAV repository – one setup
directive, one directive to enable it (DavLockDB, Dav On)
DavLockDB maintains lock status of files accessed via DAV – Windows DAV
implementation doesn’t implement locking, limits what you can do when connecting
via Windows
Dav On must be in directory scope
DAV implements methods on top of GET, HEAD etc
‘Limit’ can be used to require authn before using DAV methods – anyone can use
http methods, permission required to use DAV ones
Remember that DAV is running on your webserver! PHP & friends will be
interpreted as normal when you ‘GET’ them
Don’t permit upload of PHP files
Files need to be writeable by webserver user – goes against usual best practice
Possible solution: run a secondary webserver on a different port, which can
write as necessary, and is as well locked-down as possible (minimum modules/no
PHP/low MaxClients/SSL/Authn etc)
All OSX applications are DAV-aware – can r/w to a DAV repository
(Insert sneaky FeatherCast plug)
Network Places/Web Folders on Windows
Novell – NetDrive (no longer available from Novell’s website, Google for it!)
DAVFS is in most modern linux kernels
DAV on Windows is just full of awkward ‘fun’. NetDrive++
iCal – sneaky plug for the ACEU2006 iCal files
http://www2.et.byu.edu/~njones/share/outlook2ical/ lets you manually publish an
Outlook/Exchange calendar as an iCal file
phpicalendar++
Subversion uses DAV as the transfer protocol
DAV can replace NFS and SMB to get away from OS incompatabilities/hassle with
filesystems
More secure replacement for FTP, can be used over https too
Mads Toftum was up early this morning, with several UserFriendly cartoons to keep us alive and awake, and lots of good tips for troubleshooting httpd config problems.
Getting right error message, getting sufficient information about a problem
You can always try to force it – there are very few personal problems that can’t
be solved by using dynamite!
Backup, backup, backup!!!
Version control
.old, .older, .reallyold, .oldest
cp httpd.conf httpd.conf.`date’+%F_%H%M’`
inline copy/comment out
Browsers lie. [Ed. note - oh so much. All the time.]
Caching – try touching file, GETing again, checking Last-Modified:
Browser errors
IE – “DNS Error” = default “I’m not telling you what’s wrong, so nyeh” error
Serverside – generic errors
httpd -V
Find out where config file is living, where logs will be found, version, when
built,
-V: show compile settings
-t: syntax check on config files – use this BEFORE you stop the old instance!
-l: list compiled-in modules
-L: list available config directives
telnet to port 80
GET / HTTP/1.0
HEAD / HTTP/1.0 -> mostly supported, gives just headers
Host: www.apache.org -> to test if things work, before DNS is set up/working
openssl s_client
Ala telnet, but wrapped in SSL
-showcerts -> dump server certs
-state -> how far it gets in the negotiation etc process
-reconnect -> test that you can reuse an old SSL connection
“I can’t connect” – firewall, no internet access, webserver not running
netstat -an (| grep LISTEN)
netstat -anp -inet (p = process listening, -inet gets rid of local sockets etc)
http://httpd.apache.org/dev/debugging.html
gdb, strace (use to diagnose errors while starting that never get to error log
etc – often opening the log file dir)/trace/truss/dtrace, tcpdump
http://www.research.att.com/~hpk/wsp/ – web scraping proxy
Webdeveloper for Mozilla/FireFox
Always check the error log!
LogLevel: be careful about ‘debug’! Log files get big, fast.
Turn off RewriteLog in production – great for debugging though!
Connection errors – is the server even running/listening? ps, netstat, telnet
Did the request reach the server? tail -f accesslog, tcpdump
Protocol errors – openssl s_client
Startup errors – Always look in the error log
Socket already in use – check for duplicate Listen directives
Common problems: ServerName, non-existent log-file dir
404s – error log, access log
DocumentRoot pointing to the wrong place
Alias maps something to the wrong place
Redirects/ServerName/Rewrite problems
Relative vs Absolute paths!
403s – error log
“client denied by server configuration” – most common
httpd.conf – look for “Deny from”
“user xxx not found” – check password file – probably doesn’t exist!
“does not meet reqs for user/valid-user” – check Require valid-user/group/user
Scripting errors
500 Internal server error
Error log
./myscript – first line must be Content-type: xxx\n [Ed. note - clearly, the
script must also be runnable!]
suexec – is it enabled? Check log.
htaccess errors
Error log 
Syntax error in htaccess = internal server error
Check context
AllowOverride (echo “garbage” >> .htaccess should throw an internal server error
- otherwise, htaccess isn’t being used)
This was given by Brian W Fitzpatrick – another great talk. Many apologies if these notes are a little less than coherent – there was a lot to get through, and it went fast
Always use one repository – except when data types (code vs multi-GB .psd
files), or access policies prevent
Authz policy – none if possible
If you don’t trust someone, don’t give them access
Can’t ever delete things from subversion
New features coming up for syncing repos
Virtual accounts viw apache ssl so you don’t need system accounts
Apache allows you to browse your repository – but is this useful?
Hook scripts – pre-commit can prevent stuff happening, but DO NOT attempt to
modify the transaction, because there’s no way for SVN to notify the client that
something has changed with what the client is trying to modify
Hooks we like – check-case-insensitive.py
Post-commit hooks, simple shell script that calls the hook in background ‘&’
mailer.py / CIA bot
Locking/Reserved Checkouts – SVN works on copy-modify-merge. Some files are
unmergeable (.doc etc)
Don’t lock everything all the time ala VSS
Only lock non-mergeable files
Use svn:needs-lock property for communication – this is subvertable
Autoversioning is great for non-coding projects, horrific for traditional code
No log messages, potentially /huge/ spam and empty revisionss
BACKUP YOUR REPOSITORY!!!
Dump vs hotcopy – all good
History obliteration should be avoided – takes a long time, invalidates working
copies
svndumpfilter has limitations, can cause problems, but can be used to dump
everything up to a certain revision, then importing all revisions after the
revisions to be deleted. Will still invalidate working copies
Filesystem based backend is just as fast as BDB, incredibly reliable, but
problems with BDB should be fixed soon
Encourage Code Review
Commit often
***Small, discrete chunks – no “power plants”
Use consistent log messages
Send commit mails to team
Don’t fear branches
Short-lived – task/bug-fix branches; Medium – feature branches; Long-term – release branches
Do have a release policy
No smart merge tracking – needs to be managed by humans, typically by
descriptions of merges in the log messages
svnmerge.py
Real merge tracking might come in v1.5
Standardise on one locale, or else.
All filenames and log messages stored as UTF-8
Use autoprops – the server can’t transmit them to clients
Useful ones – svn:mime-type svn:eol-style svn:needs-lock
Cool client tricks – switching to a branch in mid flight
In-place “import”
Mix & Match components
svn:externals not all that hot – not protocol independent
‘svn switch’ on empty directories
Managing a website in SVN – serve site from a working copy
Disable httpd access to .svn
$Revision$ doesn’t do what you want – use svnversion, designed to work with your
build system
Use pre-commit hook or wrapper to force code-styles before commit – svn won’t
do this
Don’t version ISO images!! Don’t lock everything in your repository. Don’t
forget to back up. Don’t commit gargantuan files. Don’t commit files one-by-one
when a single commit would do. Don’t forget a useful log message.
A more social post on the ApacheCon – it’s been a manic few days getting everything up and running! Now that the actual conference has begun, I can at least sit down for an hour at a time, even if I haven’t gotten to the point of single-focus for an hour yet!
The hackathon was great fun – there were plans to get some work done on mod_rewrite docs with Rich, which didn’t really end up working out… There was the ‘docathon’ organised for the Incubator project which took a while to get off the ground
I also got some basic docs on mod_ftp, from Covalent/Bill Rowe, that I’m going to ASFise/XMLify as soon as I get a chance! (Really, I’m just collecting projects, that I’ll have to get working on once all this is done…)
We got fibre laid, connectivity set up, hacking started, and lots of socialising done. Gareth Eason arrived last night, and Colm brought over half a dozen instruments, so we even had some excellent music!
The Members Reception was fantastic for the socialising – and I reckon I’ve collected enough work to look forward to some more socialising tonight without feeling even remotely guilty about it
It’s the welcome reception, followed by a keysigning party, and I just can’t wait!
For now, these are posted exactly as I took them down during the talk. I’ve realised that there’s so much going on at the conference that if I wait until I have time to edit and fix things up before I post them, I’ll never get anything posted.
No, I won’t be taking notes on all the talks I go to. Probably not even most. But I was excited to hear what Shuttleworth had to say, and I hadn’t gotten to talk to him prior to the talk (thereby sussing out his opinions in advance ). Finally, his talk was simple, and easily note-able… So here goes.
Notes from the Keynote:
Open source has come a long way in 10 years
First time he threw up as a cosmonaut – “There, there, you’ve got that over with, you’re practically a cosmonaut now, just one or two small challenges ahead”
Guerilla war, premature victory declaration dangerous
#13 Pretty is a FEATURE
Look & feel elegant – not just code
10x work for great software that’s easy to use, than just great software
Equally important on the server side
#12 Consistent PACKAGING
Solved problem
Why care about packaging? Interface to end-users
Patches disappear between upstream & distros
Improves ability to deliver code to end-users
Reduces appearance of fragmentation in the OS world
#11 Simplified LICENSING
Creative Commons seems to catch full-spectrum
Certain amount of fragmentation is essential/fundamental – CC reduces unnecessary fragmentation as far as possible
#10 Pervasive PRESENCE
Star City – no hot water, -15C “I think I forgot to turn your hot water on”
Expectations
Dealing with identity, security, “who’s present”?
#9 Pervasive SUPPORT
Support /is/ there, but there’s no sense of pervasive support.
The guy who sold the computer, the guy studying computers, should understand free software
Show non-IT-pro community that support is pervasive, professional, immediate
#8 Govaritye PA RUSSKI
350 languages with >1 million speakers
Translation is vital, vital, vital
Harness energy, communities – create expectation that /everyone/ can use free software
#007 Great GADGETS
Desktop battleground is
RedHat et al creating beachhead
Fragmented – linux is biggest platform on smart phones, but totally fragmented, therefore ineffective to create change
No championship/leadership for driving linux into still-small spaces
Telephones 10x more common in Africa than broadband (1/100 vs 1/1000)
Climb the gadget mountain
#6 Sensory IMMERSION
Tokyo guy who’s made his house into WoW – walks into rooms, hears what’s going on in parts of the world
Pervasive presence/always online + blur lines between real & digital with sensory immersion
VoIP, voice, presence
#5 Getting it TOGETHER
Leap in productivity = new goal
Fundamental change to productivity
Opportunity for OS to leapfrog – show people they can be more productive with OS
Realtime collaboration to desktop, real-life office tools
We live in a world where certain things were presumed true – have bandwidth, collaborative tools (email, revision control)
Invite people in to your desktop, to work with you, in real time
Artificial divide between people in the room, people reading later
Readers are keen – but second class citizens
Use technology to bring readers into the room
High bandwidth of body language in the room – perhaps distribute completely, therefore level playing field
When free software reaches parity with best commercial, you see an explosion of innovation – Firefox with plugins
Innovation on desktop
1st get to parity, 2nd have vision, go beyond that
#4 Plan, Execute, DELIVER
Lazy on delivery – ship when it’s ready?
Don’t make bad decisions just because it’s time to get out the door
Collaboration, collaboration, collaboration
Fragmented communities
Cohesive plan of what we want to get done, and when we want it done by
Communication to community – what’s going on, who’s responsible for what
Mozilla/Firefox RC/build systems allow people to see features/plans that were going to join the mainline at a planned time
Project clear picture of what’s important, what we’re interested in doing
#3 The Extra DIMENSION
Extra 1/2 dimension
Semi-transparent world
XGL/AIGLX
Integrate transparency, increase productivity
People don’t want to map 3D via 2D
Simple change in desktop experience – layering windows, sorting between information, keep people aware of what’s happening while allowing focus on primary tasks
Different layer of the desktop – always conscious even while working, dial-up/dial-down
#2 Granny’s New CAMERA
Power-user – extraordinary experience, absolute control, tuning, security, Linux is a great desktop for you today
Fixed-function user – Linux is still a great desktop for you today. Tele-computers, web kiosks. Don’t want granny to plug new camera into this computer.
Central block – family home PC, can’t predict what’s going to be needed, apps or peripherals. Packaging issues – plug in peripheral should make it easy to install associated software.
Today – shipping free software = monolithic block, has all the drivers it will have
New hardware = new software releases
Challenge to kernel community – evolving peripherals need evolving software
#1 Keeping it FREE
Freedom in both senses
Freedom has lit the flame amongst 1000s of developers around the world, need to keep that flame burning bright
No view on GPLv3 – will look when it’s done 
Don’t fragment around issues of freedom
Value of collaboration
Belief in collaboration – happens best at source code
My #1 priority – kid growing up in Jakarta, Indonesia has the same access to technology as his little bro, moving to London from SA.
Don’t compromise on essential freedom and focus on freedom
It’s all about fixing BUG #1
Q: How to deal with so many distros?
Distributed revision control allows people to go and see what they want to do, without completely breaking off
Soft-forks – fork because people have different focuses, still have easy mergability
Freedom to fork needn’t come at the cost of collaboration
Find the best work, fold it back in to others, back upstream
Fragmentation at periphery is good, as long as it doesn’t fragment the core
Airline manufacturers – lots of early fragmentation, some consolidation later
Preserve the right of people to pursue what they’re interested in
Notes from the “Ubuntu” talk:
Ubuntu has an average of 3.5 users per country, in the countries it has users in.
Canonical supports Ubuntu, but wants to be an “anchor tenant” in a building that grows and grows – wants Ubuntu to have a plethora of support providers
Ubuntu is not a democracy. Dictated meritocracy.
Community is not just coders – professional artists are involved, for example.
Working towards certification and standards-compliance
Simplicity, and JUST WORKS philosophy
Won’t release free software, but will allow users to pull in non-free software.
Don’t want work to go to waste, so Launchpad (designed to track bugs, releases etc) is designed to be easy for others to add to and take from, to share – both ways – with upstream code providers.
Currently we have excellent collaboration within projects, but not between projects – need to fix that.
Local community teams – getting people together, supporting each other, bringing the talent out of the woodwork.
Dapper – very user-focused, simplicity/Just Works/prettiness; Eft – developer-driven, let the pendulum swing, let community unleash itself on new technologies
Ubuntu wouldn’t have been possible five years ago – but now there’s enough acceptance of the underlying technology
Financial success can bring stress, but transparency and good governance can make that a very healthy thing
|
Calendar
February 2012
| M |
T |
W |
T |
F |
S |
S |
| « Jan |
|
|
| | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 |
|
|