Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Java

Journal Journal: Pretty printing XML in Java 1

Transformer transformer =
    TransformerFactory.newInstance().newTransformer(
        new StreamSource(
            new StringReader(
                "<?xml version=\"1.0\"?>"
                    + "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">"
                    + "<xsl:output method=\"xml\" indent=\"yes\" />"
                    + "<xsl:strip-space elements=\"*\"/>"
                    + "<xsl:template match=\"/\">"
                    + "<xsl:copy-of select=\".\"/>"
                    + "</xsl:template>"
                    + "<xsl:template match=\"text()\">"
                    + "<xsl:value-of select=\"normalize-space()\"/>"
                    + "</xsl:template>"
                    + "</xsl:stylesheet>")));
StringWriter writer = new StringWriter();
transformer.transform(
    new StreamSource(new StringReader(message)),
    new StreamResult(writer));
The Media

Journal Journal: Only a few more days till I switch ISPs

I am making the move to finally switch my DSL ISPs from Bell Sympatico (SymCRAPico) to something else. I am still a bit undecided but I may go for Golden Triangle (www.golden.net) or Rogers High Speed. Though I am very wary about the Rogers High Speed as well.

I totally despise big and amoral corporations.

If you guys have any comments or suggestions for other ISPs in Toronto, Canada please let me know.

The Courts

Journal Journal: What I would to if I were an elected politician

Get rid of the assholes and if that includes me then so be it

Please note most of these stuff only applies to Canada which is where I am from. This is also a living entry where I will change my mind as things go to my head.

On Education

  • Province wide standardized testing for teachers
  • Province wide standardized testing for students
  • Students can fail grade school

On commercial entities

  • SPAM originating from Canada is illegal and will be punished by some $$/spam reported plus processing costs. This includes Faxes, Mail, E-Mail
  • Mail-in (or similar) rebates will not be allowed, if the commercial entity wants a rebate, the rebate has to be applied before it reaches the consumer

On cars

Most people will most likely be against my views on this as it will increase their costs. However, I think it is the price we have to pay now in order to preserve the future.

  • Extra $$$ for non-renewable fuel or poluting cars.
  • Research grants to Canadian HQed Company electric car research
  • Smoke belchers whether they are from Canada or the US will be towed and dismantled.
  • Cars and trucks entering Canada from the US must pay for and pass an emissions test.
  • Research grant for reducing emission test time and costs.
  • More taxes on gasoline.
  • less or just standard tax on renewable fuel.

Marriages

  • Remove the concept of marriage from the government. This is a church concept. This will remove the definition of divorce as well as a side effect.
  • There still needs a way of dealing with the fallout when it comes to kids. Still haven't thought about it yet, but something along the lines of both parents being responsible for the kid.

Monopolies

  • Eliminate them as soon as possible.

Government infrastructures

  • All government funded works must be submitted as GPL or some other open source, royalty free license. This applies to university works as well.

Elections

  • Create the Internet Voting Network. If it becomes easy to vote maybe people like "Wally" will start voting, but at least that would be more conformant to how the population is.
  • If it becomes easy, we can have elections more often.

Privacy

Some people's views of privacy will go against mine. And actually some of it actually go against my grain of thought so I may update it as I go along.

  • Single Canadian Card that would contain all our info. The reason for this is to reduce the administration costs. The API is open source so people can scrutinize it.
  • The card contains all the key data
  • It is illegal for any one including the banks to retain data that they get from the card except for basic identification. That being said, it is illegal to transfer data obtained from the card to another person or system.
  • No single government entity may have all the data nor should they be able to access more data than they put in in the first place.
  • A government entity such as Transportation Ontario will only retain a ID and the relevant data used for transportation such as license class. They cannot obtain any more information aside from verifying the identity of the card holder.
  • The card would contain identification data such as DNA, Finger Print, PIN numer, Retina Scans.
  • Unfortunately, all people are to the government will become a number instead of a real person. Still have to work on that one.

Taxes

  • Objective: Simplify taxes so that H&R block and other tax services will cease to exist for normal people. (Businesses may still require their service).
  • Taxes are hidden from consumers by merging it into the costs.

On ISPs

  • To curb the spam problem, all Canadian ISPs running commercial email servers must register and install a filtering software for their MTA whose list is updated regularly.
  • Canadian backbone operators are required to periodically check for compliance of ISPs that connect to their backbone. (Yai, this would sound like a breach of privacy, I have to figure out how to do this a bit better)
User Journal

Journal Journal: Java Certification

Found this site on the net called Java Mock Exam. http://gstaff.org/javaCert/html/index.html

Its not a bad site. Unfortunately I took it and after 1 hour and 15 mins I got a really sucky mark of 55%.

Granted I wasn't really prepared to take it, so its kinda like a pop quiz.

I am updating my goals to have myself Java Certified as well.

Heck I am learning how to use java.reflect.Proxy right now I should be able to do this better.

User Journal

Journal Journal: Goals

  • Get out of Sympatico and switch to another high speed Internet provider. Greedy bastards. Damn intertia
  • Java Certification
  • Master's Degree. I am going to try asking my manager if I can get work to pay for it next year
  • Document how I built the automated build and test environment so it is generic enough to be reimplemented on other projects
  • Write a tutorial on Swing programming. With the following simple application, layout managers, then mouse events, action events, models (list with scrollpane), model events, testing, code structure. Then the more advanced stuff JComboBox, JTable, JCheckBox, JRadioButton. Followed by even more complicated stuff: Drag and Drop.
  • get rid of as much of my furniture as possible
  • Work on my second million (I had no luck with my first one)
  • Upgrade my car
  • Try out lobster sashimi. Probably at Sushi-Ya at Newmarket, good Japanese restaurant IMHO
  • Start journaling

Italics mean the task is completed

User Journal

Journal Journal: New start

This is another attempt at me using slashdot as a blogger. Hopefully it holds this time. I am not sure what happened to my previous entries and I am not sure how to replicate it either.

Oh well, its nothing too important anyway. I'll see how much I can put in before my data gets wiped again (which I hope is never).

Slashdot Top Deals

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...