Monday, January 9, 2012

AG and BBC on 4G and the Future of the Internet.

Very interesting report from BBC on 4g Internet (and how it might change the way we connect to the Internet).  As someone whose resisted getting a cellphone data plan and often scoffed at the idea of anything other than wireless, I must say..it's a brave new world.

http://news.bbc.co.uk/2/hi/programmes/click_online/9672822.stm

 In someways though, I fear this is an attempt by various companies to call a "do over". Once they started offering unlimited Internet usage it was going to be very hard to take that away (Anyone in the US remember when you had to watch your Internet usage  and keep it to less than 5 hours a day? I'm sure there are other nations that still have this problem).  Now that everyone and everything is hooked on the Internet, making it almost as mandatory as having electricity for some people. I think companies feel it's time for a "do over" so they can make more money. After all there is currently a "cap" on how much money you can make off of a DSL service for example. Say you target a population of 15,000. You have one competitor. At some point all 15,000 people will have Internet. And while you might get some of your competitor's customers to come to your side with a sale, they too will get some of your customers with their own sales. So you enter a state of equilibrium. Where you have let's say 50% of the market share. Those customers are going to keep paying their $1,000/year of Internet so your income becomes "fixed" (as in, every year you get 7.5  million)  but whether to please board members/investors or just to pay the bills and keep the same profit, you have to keep making more money every year than you did the year before it.  Which is just not going to happen under this economic model. For a while companies got away with introducing faster speeds at higher fees. The past few years we've seen that come to a screeching halt. AT&T has offered the same exact speeds at the same cost for years now. Only fairly recently have they started introducing their fiber network but even that is taking lots of time and I imagine costs. Enter: 4G. You don't have all the costs/effort of laying cables (well you have to install new towers) and you can now compel people to pay for the data they use with more restricted plans. As that becomes faster than home speeds you can introduce the service with "home" plans so people can use their much faster connections on their desktops (yes, yes, I know people do that now but it's often laptops on the move and not used in lieu of your home connection and people may not think to do it unless it's marketed correctly). Suddenly people are paying by the gigabyte (or terabyte as it likely will be at that point). 
 
  Young people often ignore their parents and grandparents when they talk about how "cheap" everything used to be and they often have no concept of what the "right" price is. So if you only increase prices/restrictions slowly most people will keep paying and the future generation won't notice when they are paying 5-10x more than their grand parents did.  So all in all that's the danger of being so dependent on something. Eventually the companies will capitalize on this and start pumping you for more and more money because they are, by design, also forced to come up with more and more money. Of course, infinite growth is almost impossible so where does it all end? /rant 

Disclaimer: I'm not that knowledgeable in economics this is all my own conjecture written almost in stream of consciousness style :-P. Please feel free to discuss your own opinions on this as well as flaws in my reasoning in the comments :-).

Wednesday, July 6, 2011

Verbosity

If this was a wall of text you would probably not have read it. "Brevity is the soul of wit." <- worth remembering for future writing.

Tuesday, June 7, 2011

Tutorial: Plasma+QML

 In this tutorial I will attempt to teach you how to write a simple plasma widget using qml technology. I hope you find this informative! And I am sure some of the expert plasma widget developers will be able to offer some excellent additions to this tutorial in the comments!  Before you start, I'd recommend you familiarize yourself with QML using this site: QDeclarative Introduction
(This post has some color coded sections, I am not sure that they will render properly on the planet, so if you feel you the color coding would help and you can't see it you may have to come to the blog itself.)


I.  Setting Up
   First thing is first, we need to setup the directory where we will be creating the widget.
  1. Create a directory with the name of the widget we will call ours in this example "plasma-qml"
  2. Create  a text file inside this directory called metadata.desktop
  3. Create a directory inside the plasma-qml directory called "contents" 
  4. Create a directory inside "contents" called "ui
  5. Create a text file inside "ui" called "main.qml"
We could actually create all the folders automatically using  the following command in a console:  mkdir -p plasma-qml/contents/ui


Now we've set up the basic file structure for the widget. You'll notice there are only two editable items in what we've created, the .desktop file and the .qml file. The .desktop file will contain basic information about the plasma widget. The .qml file is where we will put the actual code for the widget. More complex plasma widgets will likely have more files in them.

II. metadata.desktop
 Set the contents of the metadata.desktop file as follows. 
 [Desktop Entry]
Name=Plasma-QML
Comment=A test widget for Plasma using QML
Icon=chronometer

X-Plasma-API=declarativeappletscript
X-Plasma-MainScript=ui/main.qml
X-Plasma-DefaultSize=200,100

X-KDE-PluginInfo-Author=Ahmed Ghonim
X-KDE-PluginInfo-Email=zrchrn@gmail.com
X-KDE-PluginInfo-Website=zrchrn.blogspot.com
X-KDE-PluginInfo-Category=Examples
X-KDE-PluginInfo-Name=org.kde.Plasma-qml
X-KDE-PluginInfo-Version=0.1

X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-KDE-ServiceTypes=Plasma/Applet
Type=Service
  The first block deals with the name, description, and icon of the plasmoid. This is important for what users will see when they are trying to add your plasmoid.  
  The second block deals with what type of widget it is, where the main script is, how big the default widget size should be.  If it was written in python it would say "X-Plasma-API=python" 
  The remaining blocks are mostly self explanatory please refer to techbase.kde.org for more information.

III. main.qml
 Now to the meat and potates of the whole thing. What you all have been waiting for, the actual code that does something!

 import Qt 4.7
 import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets

Item {
 id: 'item'
 PlasmaWidgets.PushButton {
  id:btn1
  anchors { left: parent.left
                    bottom: parent.bottom
                    top: parent.top
                  }
  text: "This is a Button!"
  onClicked: {print("hello Konsole") ;  lbl.text= " hello label"}
                                                    }

 PlasmaWidgets.Label {
  id: lbl
  anchors { right: parent.right
                    bottom: parent.bottom
                    top: parent.top
                    left: btn1.right
                  }
  text: " This is a Label!"
                                         }
 }
  The main differences between this and the QML examples you read about are:
   1. import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
      this line imports Plasma's graphicswidgets such as PushButtons and Labels so that we can use them in our widget.
   2. PlasmaWidgets.PushButton  (also PlasmaWidgets.Label)
      these aren't QML widgets so we must have the import line listed above to use these.
 Please feel free to ask questions in the comments section about the rest of this code I feel that would be easier than attempting to explain it which would probably be better done in a QML specific tutorial and most of which has been adequately done in the linked QML tutorial. 

IV. Testing
 Now lets test this! Using a console go into the "plasma-qml" directory and  enter the following command: plasmoidviewer
This should give you a preview of your plasmoid. If there is an error  it will display that instead, read the error and find the offending code and fix it.

V. Installing
  To install this we would go to the console. Inside the "plasma-qml" directory  enter the following command: plasmapkg -i ./

 Next run kbuildsycoca4 by entering the command in a console (I'm not sure if this always necessary).

  Now you can add the Plasma-Qml widget like you would any other! Congratulations you have created and installed your first Plasma widget!
As an exercise try making a calculator widget.

IV. References
    I used the following tutorials and this one is based on them. Please use them for more information. In general techbase.kde.org is your main resource for kde development.
       Techbase Plamsa/QML
       Techbase Plasma/Javascript
       For more on QML examples

Update:
From Daker Fernandes Pinheiro: "It's important to let clear that once the Plasma Components http://codecereal.blogspot.com/2011/05/plasma-components.html is ready, the QWidgetProxy solution will be deprecated. These components must follow a common API: http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-200. As I explain in the post, many of these items already can be used, and I'm planning to integrate the done components in master branch in a few weeks."

     

Tuesday, May 24, 2011

Fedora 15

Fedora 15 is out! I highly recommend the KDE spin for those who like a simple, unbloated KDE based OS.  http://spins.fedoraproject.org/kde/

Wednesday, May 11, 2011

I need a new distro version 2

   Recently I've been surveying a lot of KDE distros. I tried a lot of live cds and looked at a lot of videos and screenshots. Things have changed a little bit since I last searched for a distro. People have started modifying KDE (KDESC?) a bit more from the defaults but not by much certainly nothing that compares to how much Gnome2/Kde3 were/are customized. In any case I eventually decided I had to settle on something. So I went to my s.o.p for distro selection. Make a list and use each distro long enough to decide if it was something I could use with minimal annoyance. Here are my findings so far.

OpenSuse:
  I received a great many suggestions for OpenSuse and Arch Linux (and Chakra). I tried OpenSuse 11.4/Tumbleweed. I had many issues with OpenSuse 11.4 unfortunatly. I thought perhaps switching to Tumbleweed would fix them but no cigar. The one thing that sticks in my mind is that my ability to click would randomly stop (yes that is click on buttons). I could use keyboard shortcuts and buttons etc.  would work then. Very odd, especially in light of  OpenSuse 11.4  getting so much praise  which I'm sure is well deserved. There were a lot of great things that I respect about OpenSuse and I certainly respect anyone's decision to use it. However I moved on.

   My next distro was going to be Arch. I have a great many good memories of my time on Arch. Almost every thing I learned about Linux I learned using  Arch. However I felt the time to set everything up and take care of all the little kinks might be too much so I decided to try Fedora ahead of Arch.

  Fedora is my "alma matter" the first distro I ever installed, and in my opinion currently the best gnome distribution out there and given current my experience, I might even say it has the best KDE spin I've tried so far. It's not so much that it does anything special with KDE, it provides basic vanilla kde (though Fedora 15 has an awesome ksplash!). Perhaps that is the beauty in it, nice and simple (they don't even split the kde packages). So far no problems I was able to get to work with minimal setup time.

  My reasons for leaving Kubuntu were initially based on the fact that ubuntu had managed to introduce a bug in natty that led to my laptop overheating. This issue managed to resolve itself soon after my decision to switch and the latest Kubuntu release is actually pretty good. However I decided to take the opportunity to try something new.

 So it is that I'm currently sticking with Fedora and so far I am quite pleased. If that changes then I still have Arch, PCLinuxOS and Mageia.

Monday, May 2, 2011

KDE: Unity Setup

First some screens:







   You are looking at a picture (within a picture) both showing my crude 10 minute implementation of Ubuntu's Unity layout by customizing plasma. There was 0 code involved here on my part. It get's basically similar functionality to unity (not everything obviously) and it has both a composited mode and a non-composited mode that you can switch seamlessly between as an added advantage. I think the Ubuntu team should have started with kde technology I feel it would have made their lives much easier and this is a platform that is powerful and would have saved a lot of effort.


  How to-ish:
     Basically you add the Window Menu bar widget to a panel. Then you move the panel to the top. You add a second panel to the left with a task bar widget in it. Tweak the size and make it autohide. Also, notice that the Title Bar disappeared in the full screen window. Well you can do that with any window manually but with a little handy work, you can actually have kwin hide the title bar when you maximize the window. (This is one of the areas that would require work to reach unity's level of functionality though as no window controls go into the panel.

- kate .kde/share/config/kwinrc


- add: BorderlessMaximizedWindows=true