How to fix my recently forgetful brain

I forget names.  I mean before it was trouble just to learn someone’s name.  But now I’m talking about people who I really know.  It could be awkward.  Here are the ways I’m trying to stop my brain from aging. Full Article by Me

Posted in Uncategorized | Leave a comment

The way people talk; For filler, and for distance

I heard on the radio “Make a New Year’s resolution to listen to more great Canadian music”. Does she really believe anyone is going to do this? It’s just filler like almost all radio chatter.  We don’t need to constantly hear someone chatter just to fill in space.  More

Aside | Posted on by | Leave a comment

The Acquisition of Knowledge and Post-Moderninsm

With my readings this week I’ve come across the notion that striving to acquire knowledge is a little like striving to obtain possessions. You can’t take either with you. Is learning piano more acquisition? Read more on my shiny new blog

Posted in Uncategorized | Leave a comment

Ubuntu JPA With Eclipse

We’ll use Derby, already installed with Glassfish, and show you how to use EclipseLink to have Eclipse automatically create your tables.  This tutorial starts where my previous tutorial on Glassfish installation ended.

This tutorial will create an object called Employee, save it to a database using JPA and Eclipse.
It requires a download while creating the project, in step 12.

1. Assume you have installed “Eclipse for Java EE Developers” version: It’s the big one: 200+ MB

2. No need to install Derby, because it was already installed with Glassfish.

3. In Derby’s bin folder, invoke startNetworkServer by doing this (thanks Anthony for the proof-read):

cd ~/glassfish3/
javadb/bin/startNetworkServer

It should now be saying it is accepting connections.   This will start up the database server, and it will continue to run; let it (Control-C is a proper way to shut it down if you ever need to).

4. Start up Eclipse.

5. Window/Open Perspective/ JPA.

6. Window, Show View. Other. Data Management. Data Source Explorer.

7. In the Data Source Explorer window, Right click on Database Connections.

8. New. Derby. Next.

9. You will note that it gives you some default database information. It gives you a database named “sample”. Don’t change the username and password, because Derby will accept any username and password by default… it’s good that way. Click finish to complete the connection to the database.
=====

10. File. New. JPA Project.

11. Enter Employee for the name. Target runtime: none. Configuration: Default configuration.  Next/  Next.

12. Platform: EclipseLink 2.4.x. Type: User library.   Just under “User library”, and to the right of the white area are two tiny little icons.  (Now click the icon for) Download library. EclipseLink 2.4.1 for Juno. Start the download.

13. Select the connection.  Mine said “New Derby”.  Agree to add driver to library build path (ensure there’s an X in that box). Click Finish.
=========

14. File. New. JPA Entity.

15. Java Package: mystuff. class name: Employee. Next

16. On the entity fields, (click Add) add 3 fields:
type: java.lang.Long    //   name: id  //  OK //  (now click on the Key checkbox to ensure an X is on this field only)
(Add)  // type: java.lang.String  //  name: name
(Add)  // type: double  //  name: salary

17. After ensuring that the Long is uppercase, String is uppercase, and double is lowercase, and that id is a “key” field, (be prepared for upcoming errors and then)  click finish.

18.
It should now show an error about the schema USER not agreeing with the table Employee. That’s OK. It doesn’t know that we are going to have it create the table automatically too.

In Project Explorer window, expand your project (Employee) , expand JPA content//  and then double click on persistence.xml until it shows up in the editor window.

19. At the bottom of the editor window (this is a little hard to explain, but the [center editor] window which has two tabs at the top actually has about 6 at the bottom of it) , click on “Schema generation” tab.

20. Change DDL generation type: Create Tables

21. On the “Connection” tab, select Transaction type: Resource Local. Scroll down on this editor window, and in the “EclipseLink connection pool” section, click on “populate from connection”.   If it asks which connection, select the one that you made when you created your first Derby database.  It probably says “New Derby”.

22. Save the file persistence.xml that you just edited.

23. If you are not getting errors, go to 24.   (If you are getting errors…) Please look at this link , and do what it says:

http://adterrasperaspera.com/blog/2009/08/11/eclipselink-jpa-in-eclipse-dumb-error-message

If you ever run a derby project and it chokes with errors, also try this:

Project/Properties/Libraries/Add external jar  (and add derbyclient.jar which should be in ~/glassfish3/javadb/lib

If ya like this article, pass around the luv and say thx :)

Posted in Uncategorized | 6 Comments

Trusting My Own Inner Voice

As part of my morning ritual, I was reading from “Conversations With God (Book 1)” around the part where he talks about how we have allowed ourselves to be guided, (or perhaps controlled?) by the wills, the judgment, and morals of others rather than trusting our own moral compass.  Apparently we do most things because of what others would think, or that’s how you are expected to behave. 

This leads me to the topic of what a great responsibility it would be to act in accordance to your own values, and your own judgments, and to try and find that inner voice, untainted by the overwhelming voice of what society expects.  That would be a challenge.  But it might be worth spending some time thinking and meditating about.

We do so much just to please, to be accepted (especially), and because it’s the norm.  Walsch (the author [or the voice of God, depending on your point of view]),  told us that we are all given the power to choose, to make decisions based on the gathering of facts, but much of the time, our final action is usually really based not on our own intuition and inner judgment, but on what is expected of us.

It might be better (and definitely the harder path to take) to follow our inner voice, but first we have to ask it, and then listen attentively.

Posted in Uncategorized | Leave a comment

2012, The World Has Already Changed

There’s a slew of technology out this year, that although a lot of it kind of existed before this year, this is the year where it becomes widely available.  Let’s start with everyone having access to the means of production (ie factories).  You can create your great idea using say Google’s sketch tool, then upload your sketch to one of the many web sites that will make your product for you and it gets delivered to your doorstep.  Cost?  As low as 25 bucks.

That’s nothing.  This year will see the beginning of many people owning their own 3-D printers, where they can basically create a product on their own desktop.

OK Mind control.  This is real, folks.  I’ve seen some videos last year on early mind control, but a company has created a small helicopter (one of those many tiny helicopters you see on youtube) that you can control with your mind.  Available just months from now.

Now Virtual Reality.  It’s been around in name for years.  But I think a few products are coming out (glasses/headsets) that will bring it to a new level in realism.

Regarding everyone being able to make whatever they desire at home, or even make 10,000 of them or start a company themselves making that stuff, read the book, just published,  “Making It”

Posted in Uncategorized | Leave a comment

Emulate the Greats, Do a Small Piece thoroughly, and Creative Time

Somewhere I read that the Bronte sisters used to create stories all the time, just for practice; kind of like throw-away stories.  This gave them skills that they could use later.  It was just a way of exercising the creative muscles.  And another place I read that you can stimulate your creative juices by copying directly from someone’s creative work.  They specifically stated typing out a piece of prose, or singing exactly with the intonation of another singer.  Part of it was also the notion that if you emulate the greats enough, some of it is bound to rub out on you.  So with that, I’m including a bit of Jane Eyre, this part is nothing important to the story, but it just shows the writer’s skill.  Jane is writing about here her first night at her new home:

When Mrs Fairfax had bidden me a kind good-night, and I had fastened my door, gazed leisurely round, and in some measure effaced the eerie impression made by that wide hall, that dark and spacious staircase, and that long, cold gallery, by the livelier aspect of my little room, I remembered that after a day of bodily fatigue and mental anxiety, I was now at last in safe haven.  The impulse of gratitude swelled my heart, and I knelt down at the bed-side, and offered up thanks where thanks were due; not forgetting, ere I rose, to implore aid on my further path, and the power of meriting the kindness which seemed so frankly offered me before it was earned.  My couch had no thorns in it that night; my solitary room no fears.  At once weary and content, I slept soon and soundly; when I awoke it was broad day.

The chamber looked such a bright little place to me as the sun shone in between the gay blue chintz window curtains, showing papered walls and a carpeted floor [...]  My faculties, roused by the change of scene, the new field offered to hope, seemed all astir.  I cannot precisely define what they expected, but it was something pleasant: not perhaps that day or that month, but at an indefinite future period.

My piano playing over that past two days (yes only two) has been more geared towards learning specific songs and less towards chaos and “oh this seems like something interesting to learn this minute”.  So I did a little research online about how to practice efficiently (effectively?) and it says that you should only do a a bar or two (they say 7 notes!) and do it well, and get it down perfectly.  However, I had been doing an entire song at a slow speed, and then going onto the next song, doing the same, and then repeating it all at a slightly faster speed.

There is a lot of research into learning.  We should know by now how to learn, and we do know a lot more about it.  When I was studying scrabble (yes studying), I read that new chess players these days can get to the ‘expert’ category much faster than in the 1980s because they can use the assistance of the computer for doing game analysis, simulated moves and statistics and probabilities of winning based on what you do if you move x.  The computer tells you what are your chances of winning, and it shows a lot of data related to what statistically is likely to happen.  But I digress.  To learn how to learn effectively, you have to look at the research into learning.  There’s lots of it online now, which is why we are now in a better position to learn new skills effectively than we were thirty years ago.

So I found some books related to that, and I ordered them all from the library.  They of course will all come in at the same time, so I need a railway car to take them all home.  Hmmm, what I read lately is that you should learn one piece and FINISH it.  Same goes for reading I suppose.  I’m so undisciplined.

Now creative time.  One of those books is something about Artist, or inner artist.  I forget what, but it’s highly rated in Amazon.  It states something about making some time in the morning to do your art (whether writing or whatever); I suppose it’s a half hour set aside specifically to engage in your creativity and do your thing. (Painting and writing comes to mind).  It said this because we tend to get caught up in life, taking out the garbage, dealing with the kids, etc. and never ever get around to doing what TRULY makes us happy, which is engaging in the creative process FOR OURSELVES.  So get cracking, and start your art.  Now.

Posted in Uncategorized | Leave a comment