2013/12/29

Fedora 20 and Cinnamon

This is my story about how I went from hating the new Fedora so much I was ready to switch and then how switching to Cinnamon and making a few tweaks and it is now possibly my favorite distribution and desktop I’ve ever had.  I hope this is enjoyable or useful to someone!

When I first upgraded to Fedora 20, I decided it was the worst Fedora release ever.  I was having problems with every aspect of it.  Even non-gnome apps weren’t working well.  I was just about ready to give up on Fedora completely after using it since Red Hat 5, but decided I better try to fix some stuff first.

Some of the problems I was experiencing
  • First thing was the graphics was all messed up and NO Catalyst support any more
  • Then I realize its all about the changes to Xorg by Fedora so they can start moving to Wayland
  • Then I notice that eclipse is completely crashing repeatedly
  • Then I notice when running some apps gnome restarts
  • Then I notice that sometimes gnome isn’t restarting but dying and causing the need for a full restart of X.
  • Power management was shot

So after working out some Xorg stuff and getting a usable system I got back to work -- and this is when I really noticed most of those problems.

First I decided to try to clean up my home directory thinking that maybe there were some settings in there that were conflicting with the new gnome 3.10.  This resulted in no improvements and actually completely ruined the performance of Lotus Notes to where Xorg would use 100% of the cpu and the system was pretty much unusable.

I had had enough.  I started debating between going back to Ubuntu or going with Mint.  After making the decision I would go with Mint between the two I decided I would check out a couple of the other Desktops that came with Fedora in case any of them were working better than Gnome 3.10.

And here is where things started getting better.  The first thing I noticed is that yum revamped its group handling and using some new commands yum groups list and yum groups install … I added several desktop environments to start trying out.  A very easy step -- I have done this many times before with yum group-install but this was definitely a nice refinement.  Additionally the yum groups list organized everything into “environments” and then normal groups and also shows nicely what is installed and available.  That was the first plus of the experience so far.   

The other huge plus was how many environments are ready to install and use, highlights include:
  • GNOME Desktop
  • KDE Plasma Workspaces
  • Xfce Desktop
  • LXDE Desktop
  • Cinnamon Desktop
  • MATE Desktop
  • Sugar Desktop Environment

First I tried XFCE which has a nice clean interface, although my fonts were not near as nice as they were in gnome.  Also the performance of Lotus Notes was still shot.  But at least gnome was not crashing repeatedly.  But I was having power management issues and a few other complications and so decided it was time to move on.

Next up was Cinnamon, and let me tell you I have gone no further.  Cinnamon is really a great desktop.  I feel like I’m finally home after all these years of turmoil since starting on gnome 3.  And it feels like a present to Linux since I believe today is his birthday.  I really hope he gets this message to try Cinnamon.

So no more application crashes and I upgraded to IBM Notes 9.01 and it seems to be by far the best version of Notes to date and is performing very well under Cinnamon.

So how is my system now?  Notes on some of these fixes below:
  • Performance is great
  • All crashes gone
  • Fonts are beautiful
  • And my power management is better now than it ever has been

  • Eclipse was crashing because of some kind of conflict with the google-talk plugin -- I really haven’t been using google talk functionality on my laptop so this was just an uninstall.
  • Cinnamon fixed all of the issues with gnome I was having
  • I installed the cinnamon-workspace-grid to get my 3x3 desktop grid back (I think 2 dimensional workspace grids are a must for multitasking -- once you get used to them everything else causes way too much inefficiency)
  • Power management required learning a bit about the new /etc/systemd/logind.conf and then everything is beautiful.  
    • Basically in that file I set
      • HandleSuspendKey=ignore
      • HandleHibernateKey=ignore
      • HandleLidSwitch=ignore
      • HandlePowerKey=hibernate
    • And then I used Cinnamons Power management to set
      • When lid is closed to hibernate on battery and “Do nothing” when on ac -- this should be the perfect setting when you use your laptop with a docking station (closed) with a couple monitors.
      • Note I set the power button action to do nothing in the Cinnamon control panel and set it to be handled by systemd because there seemed to be issues with resume from hibernate the other way.
    • At any rate the sleep button works perfectly and back up on running in about 3 seconds, the hibernate works perfectly and automatically when it is supposed to.
  • Also as a side note, the Notes 9.01 install was the easiest install to date I downloaded from IBM and untarred it. then simply a yum localinstall *rpm and it was done.


2010/04/03

Thoughts about Apple and iPad

A friend of mine and I were discussing the iPad virtually over coffee and tea and as the buzz discussion progressed (and I fell behind, quite the prolific author is Ted), I realized that I wanted to work it out so I could just get this all down as a blog post.  Not sure if it will really increase the readership of the debate any (1), but it just seemed better for a blog post then a buzz comment.

So the events that took place roughly follow the following:

I got a tweet that said, hey everyone read this (paraphrased to protect the innocent):


http://www.boingboing.net/2010/04/02/why-i-wont-buy-an-ipad-and-think-you-shouldnt-either.html


So I read that and enjoyed it and posted it to buzz.  I got a reply or two (which is really more than I ever get) so I found this all very engaging.

One of the comments said this:

actually, john gruber has a phenomenal response to this:

http://daringfireball.net/2010/04/kids_are_all_right



In response to the article.  It is an interesting read.  And I'm going to start with a huge digression before I continue (might even be in response to some other stuff that was written ;-)).  I have loved writing software since I got my Sinclair 1000 back in 1980 (or was it 79).  I loved it so much more than playing games on the Atari 2600.  As a matter fact I then got and programmed on the Commodore Vic 20, the plus 4, the 128, then started into the PC era with a 486 and have then bought or built several PCs since then.  You know what?  I never bought another gaming machine until the PS3 -- which I could install Linux on.  Now as it turns out that was really a farce because you can't access the graphics chip to any extent and now they are removing the support so they have now lost me as a customer.  Except that its still a great BluRay player oh and I can download games for it.  The game I play most?  Sudoku...

But back to the article.  There is no valid comparison between wanting to be able to install any software that you want on the computing device you just bought and and buying a car and not wanting to work on it.  There just isn't.  Its an invalid comparison.  Now I'm not talking about what I prefer here, I'm just pointing out the whole issue -- the whole comparison is based on a fallacy.  It's a trickery of words.  Just because the comparison was made and sounds reasonable, does not make it so.

Anyone making the argument is basically equating having to work on the car with the ability to do what you want with the device for which you just shelled out hundreds (thousands, etc.) of dollars.  They are not equal.  In fact, you can buy the car and choose to work on it yourself or chose to pay someone else to work on it.  You don't even have to take it to the dealership!  The comparison breaks down in so many ways.

If you were to really want to make the comparison valid, it would be that you couldn't go buy a cup holder and add it to the inside of your car.  Or replace the mats yourself.  Or go to your favorite car audio shop and have them install the coolest stereo that money can buy.  These are things that you simply would not accept from a car manufacturer but some how are being accepted by the iLoveApple community.

Okay I'm done with that one, but its really important that people do not read those comparisons and think that they are valid.

Okay next we get to another point that is really good, but just not valid.  And this is because the point it makes is so clean and "of course I want the world to be that way," and it is only upon further inspection that we realize that yes it should be that way and it has nothing to do with the freedom that we should have with our devices.

but i don't want all possibilities open. lets say there are 3 groups of tasks i break the computing world up into... group A are those tasks i want/need to do. group B are those i might want/need to do in the future. group C, which is by far the largest group, are things i don't care or want to do, ever. when i pick a device that is intentionally limited or constrained in some way, i ask myself in which of the groups of tasks do the limitations fit. the limitations cory pointed out are pretty much all group C, and this is the important point, to me.



So first lets just start with: you don't want to be able to put a media player on your device and use your own media library?  You don't want to be able to run software just because Apple says you can't because it competes with them or Steve's in a bad mood?  That really falls into category C?  Come on, you drank the cool aid and now you're just rationalizing :-). 

The real issue is you just want things to work.  And I get that.  When I write software I want it to work for everyone, perfectly, everytime, period, period.  But once again there is an illusion of words going on here.  Having things working perfectly is not at odds with having the freedom to work on your computer any way you see fit.  In fact in my case they go hand in hand.  My computer wouldn't work for me near as well if I didn't have the ability to put scripts on it that automate so many things that people spend countless hours doing.  So justifying that its okay for it not to be free because you don't want to work on it is just drinking the coolaid.  They are unrelated.  It is being preached to mask the control.  Don't buy into it!  Use their products all you want, but don't act like the comparison is between it working well and being locked in, or it not working well.  For one that is the arrogant trash that is being spewed [by we know who], and two its just ridiculous.

Next there was another really good point, but again it just doesn't really apply to freedom -- it applies to software in general and has nothing to do with freedom.  I must applaud the points because they are so true and so important to the computing industry today that they deserve praise and blogs about the points.  I just feel like they are great points that really do not pertain to whether consumers deserve to have some freedom on the devices we buy.


...with the ability to anything you want, comes the responsibility to maintain all of that. that responsibility is a HUGE chain to me, and thus a limit on my freedom to simply get done the tasks i need/want to get done.

So with the ability comes nothing but ability.  Ability doesn't imply any responsibility.  They are totally separate.  In fact, even if you use the ability to do lots of fun stuff to the computer and mess it all up,  you roll it back to the state that was good and you keep do the tasks you want / need to get done like nothing ever happened.  The ability to mess it up to learn more about it and then roll it back may even help you do what you need to or want to get done.  In fact, this has been the basis of research and learning for thousands of years has it not (minus the rollback part -- that is new to the last decade I think ;-)).

So in summary it is very important not to confuse freedom to use a computer with any potential issues that computers have today.  They just can't be equated, and shouldn't be equated, because the sheep will follow.  It is not correct to link the right and ability to be able to do something and the responsibility to have to do it -- that in fact is taking away the freedom is it not?  So everyone, use whatever platform you like.  But do not drink the coolaid if it is telling you that you should trade off freedom for things to just work.  Everything should just work.  And everything possible should be based on open standards so you are not locked in.  That is what we should be focused on and not how do we rationalize getting locked in to another vendor's product line.

Just by 59900 cents worth ;-)





2010/02/18

How to provide settings to your applications part two

How to provide settings to your applications
part two
using your database



This is a second look at providing access to settings.  For the original please see http://gcruscoe.blogspot.com/2010/01/how-to-provide-settings-to-your-web.html

Overview

Please read the original article and then come back.  I'll wait, I promise.

Okay, great, glad you're back.  We are now going to supplement the previously described procedure to make the system more robust.  In order to do so we will need to look at what drawbacks there are to the method and how we can overcome them.  The description here is going to describe using a database for this approach although with a little imagination, we could come up with many different ways to get these settings.


Details
The rest of this article will focus on the setting up application servers, applications, and databases to handle settings that can change in different environments.  There are many aspects of this that will stay outside the scope of this article, like setting up the databases, proper naming conventions, etc.

So after our last look into property files, we have decided not to hard code the settings into the applications, and not to make a build specific to a particular environment.  But we still need all of the information in the application when it is built.  So what happens when a new environment is setup or an existing one changes?  This will require changing the properties files and redeploying the archive to all of the machines.  There has got to be a better way we must all be thinking right now.  And of course now we now that putting these settings in the database can offer us many benefits.  Most importantly all we need to do is change the settings in the database and the app will automatically get these new changes.  No deployment necessary.  It does has the drawback on requiring a database, but if the application already has that requirement then this is a non issue.  If it is an issue then there are plenty of other ways this can be handled.  A JNDI look up to an LDAP server, a web service call, etc.

For now we are going to focus on setting up our application to use the database.


Lets look at this in more detail...

Because you can setup a datasource at the container level, we have to question whether we even need the aforementioned, ServerEnv variable at all.  Each application server is setup to talk to a database in its environment (DEV, TEST, PROD, etc.) -- so why do we even need a setting?  You might not.  However there are situations where different types of servers may talk to the same database so in this case you will still need the ServerEnv variable.  We want the container to know what environment its in just in case.  The implementation of this is app/web server dependent but in general it will be something along the lines of edit the server.xml for your container or domain and add a system property ServerEnv pointing to the appropriate Environment.

e.g.
<jvm-options>-DServerEnv=DEV</jvm-options>

Okay now that that's set (and the app server is restarted), what else do we need?  We need a way to talk to the database -- again this is out of scope but we are going to assume there is a datasource setup for the app server and our application will be able to talk to it without knowing where it came from (this is of course a very common and highly recommended way to set up a system).

So our application needs at least one piece of information to be deployed with it -- the application name.  You can expand on what information is required as needed for security but we'll keep it simple here.  So the application will have a small property file that will contain its name and for fun you may want to add a version number.

When the application wants to get its settings, it will get them from the database that is linked up with the (or one of the) data source(s).  Okay so then the application gets all the properties using the getProperties(filter) library command that is included in every new application.  This only needs to be written once and everyone gets to benefit. 

What goes into the filter?
  • app name
  • version
  • environment

So the database has everything it needs to find properties.  Of course it can be normalized or just a string concated together, but the idea is that each key contains

appname.version.environment.propertyname = value

and you get all the properties from the database and then in the application you have your hashmap of just

propertyname = value

So now the archive can be deployed anywhere -- even in environments that were not thought of when the application was made.  All that is necessary is to create the appropriate settings in the database for each application.


Summary
So in summary, the ServerEnv needs to be in every server so that each server can fine tune what information it needs from the database.  The application only needs to know its name and version.  One build can go to any environment, even if it doesn't exist yet.  Each database connection is setup for the app server so the app doesn't even need to know about that.


Happy Coding!






2010/01/27

How to provide settings to your web a...

How to provide settings to your web applications


Overview

An app shouldn't need to know what environment its going to be deployed into, however the maker of the app should know about the resources that are going to be required.  So there are [at least] two good ways to do this.  Store all the settings for an application in the database and then the only thing that is required is the database configuration for each environment -- which is usually handled by the container.  Or you can have all of these settings in in property files with an extension that indicates which environment (DEV, PRD, etc.) that the setting is for.

The down side to the database is that anyone can change a setting that they think is only for their app and it will change all of the apps that are using it.  The downside of having the settings in a property file for each app is if the resource does need to change it requires the change to be made in all of the applications.  It is similar to the battle between deploying dependent libs where they are accessible to everyone all at once or deploying the dependent libraries with each application.


Details
The rest of this article will focus on the later approach.

So we have decided that we want all of the settings in property files.  And we want each container to know what environment it is in.  Then we will have a library that will pull the correct setting for the property depending on the environment.  This library will be reused between all applications as part of the common framework.

Lets look at this in more detail...

We want the container to know what environment its in.  The implementation of this is app/web server dependent but in general it will be something along the lines of edit the server.xml for your container or domain and add a system property ServerEnv pointing to the appropriate Environment.

e.g.
<jvm-options>-DServerEnv=DEV</jvm-options>

Okay now that that's set (and the app server is restarted), we need to create our newly styled property file.  Oh but what does that look like?

Create a file myApp.properties and it would contain this:

# First we have LCL (Local)
theOtherServerLCL=192.168.1.1

theUserIdLCL=dev_user

# Now for DEV (Dev :-))
theOtherServerDEV=192.168.1.1

theUserIdDEV=dev_user

# Now for FT1 (Test)
theOtherServerFT1=16.32.64.128

theUserIdFT1=test_user

# Now for PRD (Production)
theOtherServerPRD=10.20.40.80

theUserIdPRD=prod_user

Now for more information about the available environments.  This really depends on the system architecture for the application or department but probably something like this:

LCL, DEV, FT1, FT2, TRN, PRD

Note that local (LCL) should probably have the same settings as DEV, but we can do additional optimizations like not combining resources so the build time is less, but by the time it goes to DEV it is the integrated build.  We'll talk more about those another time.

Next is the important decision of how to split up property files, but we'll also leave this for a different post.


Summary
So in summary, the ServerEnv needs to be in every server so that each server can indicate to the applications what environment it's in.  Each application should include all of the settings that it will need for all environments stored in its property files.  One build can go to any environment, and each environment doesn't need to know about all the possible configuration settings needed for the applications.


Happy Coding!






2009/04/23

The Setting Sun

You don't know what you've got, 'till its gone they say.  And I do believe its true.  Although, I've know for over a decade that Sun was the best company.  So many didn't see it that way, but it was so clear to me -- and it got better with every passing year.  Their products ranged far and wide.  The one that pulled me in was Java, but over time you learn about all of the other parts of the stack.  And over time that stack grew.  By the time they added mysql to the mix they had everything from the hardware, OS, the incredible ZFS filesystem, the JVM (and all those languages that it supports), Java, Java EE 5 (which IMO is the best framework ever created) and the mysql database.  To mix this into an enterprise you have the ldap and access manager providing single sign on and a portal.  Simply the most amazing stack, and they give it away to get you going and then offer support (a.k.a. RedHat's business model).  They had everything except good profits for their shareholders.

I believe in the freedom you don't get from Apple and Microsoft.  I also believe in products that have proven themselves.  I believe that there are many answers for the same problem, but some just feel better than others.  For the most part, Sun's solutions felt right.  There were certainly exceptions along the way, which I will not name here, but over time they were always improving them.  Always pushing forward, trying to make things better.  It seems that they were always improving.  Improving their products and improving their stack.  At this point it seemed that they were so far ahead of the competition in what they had put together, you would think that they would have been the monster everyone feared.  But they were not.  Instead this tech that Sun amassed is to be ripped apart for the benefit of others.

And so here lies Sun, sold to make a few dollars per share never to push forward again.  Could it be that they couldn't have survived?  Or was it really just the share holders wanted their money back.  I can't help but think about how many people didn't support them, all those other ways of doing things, their technologies didn't get the respect they deserved.  JavaFX could have been a great UI scripting language, Java EE 5 was a great platform for writing server code, JSF and Ajax worked great together, but now all we are left with is their competitors (free and proprietary alike).  I guess it doesn't really matter, they have been gobbled up by corporate America like everything else.  Their game changing days are over and I see an unsure future unsure ahead after having my path so obvious before me for so long.  It is the end of an era.  As with any end there is a new beginning, a new day, but this dawn will have to go on without the Sun.


R.I.P.
Sun
1982-2009

2008/05/15

First Thoughts On Java One

After attending JavaOne this year, I am more excited about Java then ever -- of course if I wasn't there would have to be something wrong with me or JavaOne. Anyway on to my take on some of the cool new technologies and how I see the current Java Space developing.

First off, I've been telling people for a long time that the best way to develop applications is to create a UI (probably best to use Swing) and have it connect to an app server to offer a consistent view of your data no matter where you run the app. I've also been trying to tell everyone that Java Web Start rocks. Well interestingly enough, this is _exactly_ what people want. Now of course they've given it the fancy name, RIA (Rich Internet Application for those freshly out of a timewarp from 2001).

Now I'm not going to tell you that AJAX applications suck -- in fact quite the opposite. If I have to run an app in a web browser, I really do hope it uses AJAX. However, for running applications, I'd rather them not run inside the web browser at all. In fact I'd like to only need to use the web browser to find the app in the first place. After that, I really don't want to go to my web browser to launch applications. Secondly and more importantly to me... I don't want to have to tie together a bunch of miscellaneous toolkits and custom javascript to make a web browser do what it is not yet meant to do. In addition, since the web browser's applications are, by definition, only available when you are connected to the Internet, I don't want to be limited in that way either. I know what you're thinking, google gears and blah and blah. Do you not see what we're doing? We are getting out the duck tape and the chewing gum and doing everything possible to make the web browser something its not.

In addition, every time I restart my web browser (or it crashes), I don't want all of my applications going down with it. Or if one application crashes, I'd hate for it to take down all of my other applications and the web browser.

Okay enough rants about why I think separate applications are better than everything running in the browser. On to more interesting things... Like synchronization of disconnected distributed applications. Basically this is all about if you have a central repository for all your data, but you want to be able to run in a disconnected mode (think on an airplane or no Starbucks near by :-)) then you want to be able to run in disconnected mode. Well if the data is updated on the server by someone else and you update your local copy, this has to be resolved. In the source code world, we often call this conflict resolution. In the app and data world we are calling this synchronization. Anyway you get the point. I'll save the gory details of this for another time.

So here we have it, great independent apps, data synchronization and a central data respository (it is doing backups and versioning isn't it?).

So what's missing? Oh yeah, a super cool user interface. And that's what most of this Java One was about -- at least for me. There were many other topics (SOA, JPA, new web toolkits, and on and on). But for me, right now I want to make apps that make you say wow (and of course have them connected to the servers, etc, etc...).

This is the type of app (RIA) that I have been focusing on for quite a while and now I'm ready to try to start adding the
"wow" part. Please go check out all of the great information (google: JavaOne). Soon I will be talking about my JavaFX coding experiences as well. For right now I just want to say how cool its bind feature is. Oh yeah, and built in SceneGraphs. I will also be adding SceneGraphs to my code to enable 3D effects to regular swing components (basically put a panel onto the SceneGraph node and do with the node what you will). So much exciting stuff to play with!

Can't wait to add some new applications to my web site. Stay tuned! So I will be adding some more details about the new application development details as I get some time to get into them some more.

Please let me know what you think!





2007/01/08

Okay, so it has been so long and I still haven't published the papers on No Silver Bullet I was talking about. I actually have split it into two papers and have the first one finished, but I want to read it and procrastinate some more. In the mean time, I figured I better put something up here after looking at my friend's website and Blog Chris Lynch Programming. So since I don't have a whole lot to say as of yet, let me start by saying that after reviewing my friends Blog entries (Jan 3rd -> 7th) I think I must try the following:

  • Brain Age
  • MyBrainTrainer.com
  • Sheep Dash!
  • Keep up with Chris' s Progress
  • Work on my hand eye coordination and work on parts of my brain that don't function very well (both of these can be accomplished using the 17 button two joystick Sixaxis controller for the PS3). I think the best tool for this will be Resistance - Fall of Man.

So a big part of my regiment is going to be playing PS3 games. That is pretty darned exciting I must say. Another thing is playing the Brain Age types of games, which for me is going to include
weboggle (google it), and Lemmings (PS3). Of course I will continue my work with Web Services, Java SE 5, Java EE 5, and Java ME.

I will also continue to look for the best available phone/PDA combo. My current criteria are:
  • Linux
  • Java
  • Qwerty Keyboard
  • High speed connectivity in my Area
  • GPS


Not sure if this qualifies me for the Enhance-athon...