Programming With Linux in Mind

by Javantea
April 22, 2008
Updated: May 24, 2008

No source code yet.

This lecture was given at LinuxFest Northwest 2008. Due to issues with transportation, I skipped into a demo of how to write some Python code and finished by telling everyone the url of my TCPDump Watch. I wrote the hard disk encryption gui I had meant to on the bus (in 1.5 hours) and was able to give a demo.

INTRODUCTION

If you want I can read this list of todos for the next hour OR I can post it on the board and we can start working on them together.

Learning to code requires a project, a set of source code, and an aha moment. Guess what we've got right here and now?

Who here thinks we can write 100 lines of code in an hour?
1000 lines?
How about 5000 lines?

If I'm going to help N people, how much time does each person get? If there are M programmers and H people who need help, how much time does each person get? If I can't help you, sorry it happens. If I can't help you in time, e-mail me on the list and we can make it work.

What makes software user-friendly?

  1. GUIs
    1. Gtk+
    2. Qt
  2. Who makes this easy?
    1. PyGTK
    2. Glade
    3. Qt? KDevelop
  3. Doing things once instead of twice, three times
    1. Mount and umount wtf
    2. Network configuration gui (ifconfig, ip, arp, iwconfig, iwlist, route, tcpdump, brctl, tun/tap, traceroute, ping, nmap, vpn, tor, ssh, wpa_supplicant, edit default config)
    3. Installation of new software minus package management (blender vs Mono)
  4. Why are these obvious things not done yet?
    1. A mountain of code, programmers are smart enough, obvious arguments.
  5. Remote GUI
    1. Maintenance can be done via gui
    2. None of the command line editors are as easy as Kate.
    3. VNC, X11+ssh vs Remote Desktop
    4. Can I use the same bandwidth of ssh in an X11 term? What about xconfig?
    5. I would be willing to use X11+ssh if I could get the bandwidth equal.
    6. Security issues (ssh 5.0 yowch).
  6. Audio
    1. alsa wtf: software mixing, mixer access
    2. Why is alsa not as easy as Win32?
    3. We're getting there slowly (my two machines love alsa now).
    4. Let's do it.
    5. Let's fix kernel panic in midi while we're at it.
  7. Voip
    1. We've got asterisk, people use it and love it. It's broken btw.
    2. Soft phones are not opensource and/or are broken.
    3. Teleconferencing is coming back in a big way now that it's free.
    4. We have a clear advantage, let's use it.
  8. 3D
    1. Blender loves us, we love blender
    2. OpenGL is a great platform, SDL is perfect.
    3. drivers are not bad, not awesome
    4. nouveau is being rapidly developed, lots of bugs but promising.
    5. 3D window managers need stability
    6. Seen kde4 lately? What a pain in the neck.
  9. Office
    1. KOffice is getting better, but it leaves a bunch to be desired
    2. Abiword, Gnumeric are seeming to lag behind.
    3. OpenOffice takes a long time to load, wth?
    4. Can we defeat the giant MS Office when we need to?
    5. Have we already defeated MS Office?
    6. Can/Should we help MS stop piracy of their office for our benefit?
  10. Wifi
    1. Madwifi not up to latest AR2007, when?
    2. Many cards are supported, what percent of common cards?
    3. AR5007 is supported in 32-bit only by the closed-source HAL.
    4. Atheros has hired a developer and promised to open source every card's drivers through the ath5k project.
    5. As mesh networks become adopted, linux plays a central role, we capitalize on this advantage but it matters how quickly/well we do it. Can we not force driver writers to *actually* go open source or must we reverse every binary?
    6. Atheros Madwifi, BCM43xx -> b43, mac80211 are revolutionary.
    7. Wifi is often poorly encrypted, can we use our tunnels to provide security to our users?
    8. WPA_supplicant obviously needs a gui. It has a few, not enough.
  11. Bluetooth
    1. Wow, it works. Bluez is good.
    2. Maybe not. Audio should totally work, right?
    3. Is it designed incorrectly? Dbus seems like a bad library. Is it just me?
    4. Let's look at the gui tools and compare them with a cell phone's tools.
    5. It's development curve is impressive, is all FOSS this good?
  12. Video
    1. Most webcams needs a non-standard driver.
    2. Software is not as good as something I wrote in 3 days.
    3. Video chat needs to be written properly.
    4. Kernel stuff isn't awesome, but it's good.
    5. As DVB ATSC stuff hits the market, we need drivers for the cheap stuff.
  13. Security
    1. We're doing well, how much better can we do?
    2. Upgrading requires root
    3. guis often abuse root
    4. network tools require root
    5. Caps seem like they would fix this.
    6. I fear zero day exploits on critical programs.
    7. Can we do better using seperation? Chroots still fail. Namespaces?
    8. create a user for an program, online persona. 100% programmatic.
    9. Local root vulns are not fun, let's end them. Linus you punk (vmsplice).
    10. A lot of people are working on encrypted drives, let's make a gui.
    11. Why don't our kernels use the NX patch? Is there something wrong with it?
    12. Is it possible to secure routers assuming we can run code on the network and whoever is the network admin (barista) can install a firmware and click a few checkboxes?
    13. We can make openvpn a 5 minute activity. PFsense tries this.
    14. Can we write a firewall that is as easy as Windows and as secure as iptables?
  14. Spam filtering
    1. Greylist + SPF is incredible; can we incorporate it into the client? Partly.
    2. Greylist's main benefit is telling the spammer to come back later, client can't do that but it can put the message in the probable box.
    3. Spam assassin doesn't compare to server-side greylist+spf or client-side.
    4. Does anyone have any thoughts or ideas? Can we fix e-mail by redesign?
    5. Can we fix it without redesign?
  15. Standby
    1. Windows has an advantage over us. Mac wipes the floor with us.
    2. Video issues. Wifi issues. Standby twice won't work.
    3. Does Ubuntu do it correctly? What do they do?
  16. Virtualization
    1. Qemu is brilliant
    2. KVM is perfect 66+ days
    3. Kqemu is an kernel-based accelerator for Qemu, but might need some work.
    4. Lguest is brilliant, 2.6.24
    5. VMWare, Xen, VServer, and VirtualBox are popular, interesting.
  17. Internationalization
    1. We have a lot of potential
    2. Why don't programming languages support utf8 variable names?
    3. I'm writing a language and language parser that uses utf8.
    4. Getting kanji to work on Slackware 12 has been a nightmare.
    5. Slackware 11 was difficult, not impossible.
    6. Does anyone else need help with their language?
  18. Accessibility
    1. A seattle gslug coder is working on testing Gnome.
    2. KDE doesn't support it period, ugh.
    3. Can we do something to help people?
    4. Comma vs period kills a lot of farsighted devs in school.
    5. Kids use computers, can we help them out or are they better off alone?
    6. Teaching people to use Linux without command line is useful.
    7. Teaching people how to use command line may be counter-productive, but we hackers have to learn it from somewhere.
  19. WM Stability
    1. Maybe it's just me but kde 3.5.7 crashes hard after 5 days.
      Restarting X doesn't fix it.
      Why does it forsake me after 3 years of stability?
      Reproducible, let's crack it one day or not.
      I've upgraded to 3.5.9.
    2. Does anyone else have WM stability issues? Gnome, xfce, wmii, kde4?
    3. As we improve WMs, X drivers, and so on many still worry that X is bad.
    4. X isn't bad, it's replacement is going to kick ass though.
  20. Message Passing
    1. Will someone use dbus in a way that doesn't make me lose my lunch?
    2. Is dcop decent?
    3. Is gnome's orbit good?
    4. Can we agree on one?
    5. Porting to other OS's requires message passing.
    6. Unix sockets aren't portable, how do we do it?
    7. select() doesn't have a good Win32 equivalent (win32 sucks) and poll() has issues.
  21. Multi-core computing
    1. With 2 cores, we are able to do some wild stuff if we thread it properly.
    2. With 4 cores, we have to find stuff for the 2 new cores to do (threading).
    3. With 7 cores (PS3 Cell), there's a lot of code writing and analysis to do.
    4. When we get to 16 cores, we should be at a turning point.
    5. When we have 64 cores, our todo list will be at least twice as long but don't worry because we'll have plenty to keep those cores busy.
  22. Old kernels won't compile, nor will gcc-3.4
    1. Umm, am I the only person who likes compiling old stuff?
    2. Is there something very wrong with this?
    3. It's probably something to do with my headers, libraries, I hope.
  23. Keyboard Device Driver
    1. I know this is kinda silly but I really want to hook up 80 keyboards to a computer via usb and then have 80 people edit 80 docs on 4 screens. Obviously we need a kernel /dev/event device for each keyboard. So far we have 80 mice and 80 joysticks. Silly, right?
    2. X wouldn't know what to do with 80 keyboards.
    3. Linux has the right driver model, let's make it work.
  24. Userland USB drivers
    1. It would be rather nice to get every low performance med/high latency driver into userspace. Libusb works but I only know of scanners, keycards, and thermometer that actually use it.
    2. Why? Userland is a philosophy thing, more security because it's not running complexity in kernelspace. If each driver was written as a high level library interface, it could be easily integrated into a hundred programs.
  25. Strengths
    1. We have the best browser and then some.
    2. We have a good e-mail client or two.
    3. We have the best office suite or two.
    4. We have the best IM.
    5. We have excellent audio players.
    6. We have the best video players minus navigation sometimes.
    7. We cater to the best and the brightest.
    8. We can read any file.
    9. We can code anything we want to.
    10. We have a darn good image editor.
    11. We have a text editor for every style of programmer.
    12. We are missing very few functionalities.
    13. The web makes us more featureful.
    14. We have device functionality for 90% of hardware (printers, etc).
    15. We have the best security for our functionality.
    16. Our kernel's quality is higher than any code ever written.
    17. We run on the PS3, already cracking BDs, Cell dev is revolutionary.
    18. We have Tor without stability issues (possibly).
    19. 64-bit and multi-core is ahead of its time.
    20. Anti-virus software once necessary will be ready and better than Windows.
    21. Security modules like those that support NX will flourish in 6 months.
    22. Paying someone to fix something will be easy.
  26. Weaknesses
    1. We lack cohesiveness quite a bit.
    2. We don't have binary support for stuff that isn't ported (Wine is 80% there).
    3. Our 3D stability is fairly awful, could become as good as Mac.
    4. Our drivers are 4 months from being 70% stable+open source, 8 months from being 100% (nouveau!).
    5. Our wifi is 4 months behind always.
    6. Audio is 4 months from being incredible.
    7. Paying someone to fix something isn't really easy yet.
  27. Programming
    1. Many programming languages are in use which means that programmers like one or another better than the others. Each has strengths and weaknesses. Is this a problem? Probably not.
    2. Is python going to lead us all home?
    3. C# is an upcoming language, will it ever work before a project dies?
    4. Will Java every get its act together?
    5. Is ruby really going to crawl from obscurity?
    6. Is anything going to replace PHP ever?
    7. Why does anyone still write perl?
    8. Is bash worthy of any minor code to be written?
    9. Who here has tried lua, haskell, dylan?
    10. If I write a language and it overtakes any of the above does it matter?
    11. C/C++ are still the main programming languages.
    12. I'm embarassed by the code that causes security vulnerabilities.
    13. Everything should be ported. What doesn't get ported?
    14. The quality of ported software is not very high, Linux versions rock. Not on purpose, but definitely by design.
    15. How do programmers get paid? **

** How open source programmers are supposed to get paid will be answered in the next lecture. I'm glad you asked. I wanted to know myself.

If you are interested in developing Linux software, feel free to e-mail me.

Permalink

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name