Thursday 10 December 2020

 Google and Facebook paying media companies

In The Age newspaper, December 10, was an article about why Google and Facebook need to be charged by the Australian media companies in order to keep media reporting alive ("The world may follow our lead on digital news", Peter Lewis). While I am sympathetic to their plight, I regard the arguments as fundamentally flawed. I wrote a letter to the The Age saying this, but it was not published. Now that's fair enough, I only get about a 20% success rate in letters to the editor. But I have noticed that The Age often likes to publish pairs of letters, one for and one against any particular topic. Alas, today's paper only had only one letter presenting only one side, agreeing with the article.

With the Web and the rise of search engines, many business models have irrevocably changed. We work in different ways, purchase in different ways, and get information in different ways. This inevitably means that some styles of business will suffer while others will blossom. In all the media forms this has resulted in a shift of advertising money from the traditional media to the web companies. So does that mean money should be diverted back to support the media companies? Following through: should coal miners be subsidised because people are shifting to solar? Should Coursera and a host of online education companies be required to pay schools and unis for decreasing enrolments? Should Kogan and other online retail agents be required to subsidise the shopping malls with falling tenancies? It's not a strong argument!

I still get most of my news through the paper copy, or online when the paper isn't delivered. I'm a subscriber and go directly to the newspaper's web site. When I want to find out something I don't know, I go to a search engine. That may be for more titillating news about the mad US President, but is just as likely to be for reviews of, say, vacuum cleaners, or where I can buy a new lawnmower, or does a word exist that I want to put in the crossword. The search engines don't care what my query is, they just point me to sites with hopefully relevant content. Should the search results be treated differently just because they refer to "news"?

What the search engines give me are links to other web sites. True, Google vectors them through its own site for tracking purposes but that is a different issue. The site news.google.com doesn't have copies of the articles, just a headline and a link. That is very different to actually showing copies - that would be breaking copyright and rightfully punishable. When I am looking for lawnmowers, the search engines give me a link to Bunnings, and when I want a review they often point me to the Choice website. Again, why should "news" be treated differently?

Searching for up-to-date news on the US President, I often get links to US media companies. When I follow through, I'm often met with a subscriber paywall. That is totally valid: you want to see something that has cost money to produce, then you can be expected to pay for it. I also read news online from the New Daily website (https://thenewdaily.com.au/). Their site is littered with adverts. Again, a valid model. It is also supported by superannuation funds as are many companies by many organisations.

I run my own web site and put my professional work there: research papers, books, links to this blog and so on. Every now and then someone comes to my site through a search engine. Google doesn't pay me for my content, and I don't pay Google for indexing it. It's win-win for both of us. I didn't know about sites like news.google.com until the media started making a fuss about it, but that also looks like a win-win: Google sifts and categorises the news and presents links to follow through.

It is true that income to the media companies is suffering and the quality of news may fall as a result. It may be that subsidies of some kind are appropriate. The questions should be about who should be subsidising who, not just a blanket decision to target Google and Facebook. The New Daily is an example of one way. Murdoch's News Corp subsidies to the loss-making Foxtel are another. Let's have that conversation rather than a flawed piece of legislation.


Friday 26 May 2017

More on Seyed Hossein Ahmadpanah


This guy is really good! Plagiarised from Niklaus Wirth even!
Here is Seyed's data structures book Seyed's book

And here is from Wirth's book at Algorithms and Data Structures



I should be honoured to be considered worth plagiarising in such company!




Plagiarism by Seyed Hossein Ahmadpanah

I've had an a book online for many years "Network Programming with Go"  https://jan.newmarch.name/golang. under a Creative Commons license which allows copies but does not allow change of copyright to another person. It is now being published by APress.

It was pointed out to me that Seyed Hossein Ahmadpanah has self-published a book "Go for Network" which is a complete ripoff of my book. Well, he did change one thing: the name of the author from me to him! Checking up, this guy is really prolific: according to ISBN.nu he has published 24 books!

A list of his magnificent achievements is given below. I haven't checked many of them, but in addition to mine, the Start Linux book appears to be stolen from Alex Carr Dive into Linux
If you know the original authors of any of these books, please let them know!

Data Structure

 The modern digital computer was invented and intended as a device that should facilitate and speed up complicated and time-consuming computations. In the majority of applications its capability to store and access large amounts of information plays the dominant part and is considered to be its primary characteristic, and its ability to compute, i...read more
By Seyed Hossein Ahmadpanah

Learn CSS3

 If you've been a web developer for any length of time, then CSS won't be strange to you. You might, however, be wondering what the fuss over CSS3 is all about. Just like the new HTML 5 specifications, CSS3 (or CSS Version 3, to be more precise) is the latest set of specifications designed to mold, shape, and define just what capabilities the newest version of CSS has...read more
By Seyed Hossein Ahmadpanah

Go for Network

 You can't build a system without some idea of what you want to build. And you can't build it if you don't know the environment in which it will work. GUI programs are different to batch processing programs; games programs are different to business programs; and distributed programs are different to standalone programs...read more
By Seyed Hossein Ahmadpanah

How to Start Java Programming

Why another book on Java? Why a book on Java and Linux? Isn’t Java a platform-independent system? Aren’t there enough books on Java? Can’t I learn everything I need to know from the Web?
By Seyed Hossein Ahmadpanah

How Operating Systems Work

 All desktop computers have operating systems. The most common are the Windows family of operating systems developed by Microsoft, the Macintosh operating systems developed by Apple and the UNIX family of operating systems (which have been developed by a whole history of individuals, corporations and collaborators)...read more
By Seyed Hossein Ahmadpanah

Proactive Cyber Defense: Security for Government

Proactive cyber defense in Government relates to the way a company is run and managed in order to ensure its well-being. All of a company’s stakeholders are basically players as far as good Government is concerned, but the responsibility and accountability for it starts with its Board of Directors and Senior Management...read more
By Seyed Hossein Ahmadpanah

Data Mining for Big Data

The most commonly accepted definition of “data mining” is the discovery of “models” for data. A “model,” however, can be one of several things. We mention below the most important directions in modeling.
By Seyed Hossein Ahmadpanah

Why Unit Test

By Seyed Hossein Ahmadpanah

Start Wordpress

Start WordPress Right Now !
By Seyed Hossein Ahmadpanah

Start Linux

Linux is a Unix-like open source operating system. At the core of the operating system is the Linux kernel. It acts as the intermediary between the applications which run in the operating system and the underlying hardware.https://www.amazon.com/Dive-into-Linux-Alex-Carr-ebook/dp/B01FFFRBBK
By Seyed Hossein Ahmadpanah

Start Php

 PHP is a powerful programming language that lets you build dynamic Web sites. It works well on a variety of platforms, and it's reasonably easy to understand.
By Seyed Hossein Ahmadpanah

Start Bootstrap

 Bootstrap, quite simply, puts the power of design and UI layout back in the developer’s hands, leaving things in a nice, clean, easy-to-maintain state that can then be passed to a front-end graphic designer whose job it is to make things shine.
By Seyed Hossein Ahmadpanah

What Is Git ?!

Git is an open-source version control system known for its speed, stability, and distributed collaboration model. Originally created in 2006 to manage the entire Linux kernel, Git now boasts a comprehensive feature set, an active development team, and several free hosting communities...read more
By Seyed Hossein Ahmadpanah

What Is Angular.js?! 

Angular.js is an open-source JavaScript framework developed by Google. It gives JavaScript developers a highly-structured approach to developing rich, browser-based applications which leads to very high productivity. If you are using Angular...read more
By Seyed Hossein Ahmadpanah

Full Android Guide: Advanced

 Android has grown from nothing to arguably the world’s most popular smartphone OS in a few short years. Whether you are developing applications for the public, for your business or organization, or are just experimenting on your own, I think you will find Android to be an exciting and challenging area for exploration...read more
By Seyed Hossein Ahmadpanah

Start Mongodb

Most of this book will focus on core MongoDB functionality. We’ll therefore rely on the MongoDB shell. While the shell is useful to learn as well as being a useful administrative tool, your code will use a MongoDB driver. This does bring up the first thing you should know about MongoDB: its drivers...read more
By Seyed Hossein Ahmadpanah

Full Android Guide: Intermediate

By Seyed Hossein Ahmadpanah

Full Android Guide: Beginner

By Seyed Hossein Ahmadpanah

Start Node.js

Node - or Node.js, as it is called to distinguish it from other "nodes" - is an event-driven I/O framework for the V8 JavaScript engine. Node.js allows Javascript to be executed on the server side, and it uses the wicked fast V8 Javascript engine which was developed by Google for the Chrome browser...read more
By Seyed Hossein Ahmadpanah

Start SQLNetwork

This book will cover the basics of SQL, and should help introduce beginners to SQL concepts. It is also a good documentation source when forgetting how the basic SQL syntax works.
By Seyed Hossein Ahmadpanah

Start Js!

JavaScript (JS for short) is the programming language that enables web pages to respond to user interaction beyond the basic level. It was created in 1995, and is today one of the most famous and used programming languages.
By Seyed Hossein Ahmadpanah

Start Go!

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
By Seyed Hossein Ahmadpanah

Start Python 3!

This is a simple book to learn Python programming language, it is for the programmers who are new to Python.
By Seyed Hossein Ahmadpanah

Start Ruby !

 Start Ruby! will help you begin programming in Ruby
By Seyed Hossein Ahmadpanah

Friday 22 May 2015

Linux graphics on Gigabyte Brix i7 5500

I've been installing and running Linux on sooooo many computers for years and it hasn't been a problem for sooooo many years. I thought it was easy now :-(. The Gigabyte Brix GB-BXi7H-5500 has got me. (But in the end I won). The problem is crazy graphics display when trying to use any of the desktop live installs, making Linux apparently un-installable.

It only has HDMI output and mini DisplayPort. I started with Ubuntu 14.04. Ho hum, the HDMI driver didn't work and I just got garbage on the screen DURING THE INSTALL PROCESS. Same with some other distros: if they wanted to use graphics with the HDMI card then I couldn't get going. And most distros want graphics. Don't confuse this with GUI options once you have a distro installed: all distros will allow a runtime non-GUI interface. I needed one at the INSTALL stage!

So, a server only distro might give that. I tried copying servers to a USB stick using unetbootin which previously has worked great. But I tried Ubuntu server and Fedora server and bizarrely neither of them worked: they kept failing to find necessary pkg files from the download servers. Eventually I got Ubuntu server to install - I guess the crappy Australian internet caused timeouts previously.

Booting off a USB stick wasn't fun. You have to turn off UEFI security in the BIOS boot menu (keep bashing the Del key on bootup to get to it). Even then, in the Boot Selection menu it only showed the USB stick as a UEFI boot, and that wouldn't boot. But in the Save and Exit menu it does show as both UEFI and non-UEFI boot. Choose the non-UEFI option.

For partitioning the hard disk, the default do-it-all-for-you only gives 8Gb for the root partition. That includes /var and /tmp so is ridiculously small. I prefer to set the disk partitions myself, giving 30Gb to root.

Then you can install the server - almost. Eventually you get to the Install Grub to a Disk. If you try it, it will fail trying to write to your USB stick on /dev/sda instead of your hard disk /dev/sdb :-(. If you don't try it, the grub packages won't be installed which will cause problems later. Either way, you have to end up selecting Don't install a boot loader.

Without a boot loader, the new server won't boot of course! Instead, using the USB again you need to get into Rescue mode. That sets keyboards and locations, downloads a base system, etc. Eventually you will get asked to drop into a shell prompt. Choose one for your hard disk's root partition. If you tried and failed to install grub to your boot sector then at least the grub package will be there. Otherwise you have to download and install the grub package - see next para.

apt-get is what you use to download packages. It requires networking to be okay. In rescue mode the resolve file /etc/resolv.conf is empty. It links to a non-existent file, so remove it first. Then you can edit it to add
     nameserver 8.8.8.8
(Google's nameserver) or similar. Then you can run
    apt-get install grub

Once the grub package is there, install it by
   grub-install /dev/sdb
   update-grub
(assuming your target hard disk is currently mounted as /dev/sdb).

So now I have a server system installed. To see if X worked, I ran
   sudo apt-get install xinit
and yes, it did. You can start X by
   startx
and it will run a single xterm. I then installed Tom's Window Manager twm. It's really basic but that's okay. I can run that from within my xterm to give me some control. i had to edit my .xinitrc to include
   #!/bin/bash
   xterm &
   twm    # synchronous!
Note that the display is still broken, but doing something really simple like this works (just).

So I got more ambitious and ran
   sudo apt-get install gnome-shell
That took over the login process and trashed my screen again, just like the install process. So there is my problem showing up.

By ctl-alt-F4 I can get into a terminal screen and check things out. I can run basic X, and it looks odd but something works. I installed Firefox but when I ran it, just a mess again - too complex for the problem case.

Maybe an up-to-date kernel. I downloaded kernel sources for 4.0.2 to another machine (no working browser on this one!) and copied it across. Built and installed it
   make
   make install
   make modules_install
and it wouldn't boot as it couldn't find my hard disk. Also needed
   update-initramfs -u
So it booted, but the problem with the display didn't go away. Kernel 4.0.2 wasn't the answer. Was it the monitor? No, worked okay with another computer (well, sort of okay - the mouse left tracks across the screen, but I've seen that problem elsewhere with the HDMI driver. Kernel 4.0.2 was not the solution.

With a working command-line Linux at least I can now find out things about the Gigabyte. The cpu is an Intel i7-5500U @ 2.4 Ghz (but I knew that already from the specs). The framebuffer is an inteldrmfb. The graphics driver is the Intel i915.

The site
https://01.org/linuxgraphics/documentation/how-report-bugs
seems to be all about Intel graphics drivers. From there I found the Graphics Installer 1.0.8 for Ubuntu* 14.10, 64-bit
The fun starts here again. It requires Ubuntu 14.10. The defaults on the Ubuntu site are 14.04 and 15.04 so you need Google to find the server 14.10. Then it installs just as described above. The graphics installer has to run under X and apart from a few glitchy effects is navigable. But once it gets going, lots of flashing lights, stray bolts of lightning, etc from the graphics card. I switched to another virtual terminal until it finished. But it made no difference - no usable X. Not a solution.

Time to look for bug reports. I found the bug "Graphics unstable on Ubuntu 14.04 and 14.10 using Intel HD Graphics 5500" at https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194
Fix #36 starts the X server in UXA mode instead of the preferred SNA mode (no, I don't know what they are)

    try to create the following folder:
    sudo mkdir /etc/X11/xorg.conf.d/

    Then create inside the new folder a file named for example "20-intel.conf" with the following content:
      Section "Device"
         Identifier "Card0"
         Driver "Intel"
         Option "AccelMethod" "uxa"
         EndSection

    Then reboot and voila."

This works! Most of the time.  Fix #100 didn't work on Ubuntu 14.10 (unresolved packages) although reports were that it worked for 14.04. But the moderator for that bug said that my bug wasn't his bug and I should log a new one.

In the meantime I had logged bug 90401 at bugs.freedesktop.org. Comment #5 pointed me to the development site for the xf86 intel video driver

   Please test the Xorg ddx driver from [1] and report back.

   [1] http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/

I downloaded 2.99.917commit baec802b21... and so far that one is okay. To build it required installing packages autoconf, autogen, autoreconf, xutils-dev xorg-x11-server-devel, libtool, pkg-config. Then run
    ./autogen.sh
    make
    make install
in the xf86-video-intel directory

This removes /usr/lib/xorg/modules.drivers/intel_drv.so and installs /usr/local/lib/xorg/modules.drivers/intel_drv.so. So far I can run Big Buck Bunny, the test suite glmark2 (test result only scores 119) (I got info about this test from Benchmark graphics card (GPU) performance on Linux with glmark by Silver Moon), browsers with YouTube movies etc.

So finally X is working, but I only have the server install. Get the GUI desktop by
  sudo apt-get update
  sudo apt-get install ubuntu-desktop

This  gives the Unity desktop. I'm not a fan of Unity, so I usually install old-style gnome by
  sudo apt-get install gnome-session-fallback
and Compiz (for wobbly windows) by
  sudo apt-get install compiz

Summary
1) install Linux using a server package with a command-line install. 
2) Get the latest source version of xf86-video-intel, build and install it
3) X should now work if you want to test it by downloading e.g. xinit and twm
4) Install the desktop package ubuntu-desktop






     



Monday 29 December 2014

Brandis caught out by metadata

George Brandis, the Attorney General for Australia is proposing a compulsory metadata retention scheme for Australian ISPs. He showed on a TV interview a few months ago that he basically had no idea what metadata was all about, mumbling about addresses on (snail mail) envelopes. Well, this week it should have been brought home to him what the fuss is all about.

Brandis hosted a dinner party in London on April 4 for "a group of senior British arts representatives". The bill was £627, with £228 in alcohol charges alone. The Age newspaper reported this as "George Brandis' 'obscene' $1100 dinner funded by taxpayers".

The food and wine were the "data" in this transaction. The topics of conversation could probably be called data too.  The cost, and the people involved would be the metadata. We don't know what was discussed, but we do know that the metadata itself has left a big stain on Brandis' character and judgement. So George, metadata counts, and your proposed legislation needs to be very careful about what is collected and who can use it.

Wednesday 17 April 2013

Behringer MIX800 ultra compact Karaoke machine

My search for Karaoke on my laptop led me to writing to a book still in alpha on Linux sound programming. But I kept returning to the original topic, and my question this time was on how to support two microphones. I also wanted to introduce effects like reverb because it makes the voice sound richer. I suppose that means two sound cards unless I can find one with two microphone inputs. Basically, to do it in software I need to duplicate a mixer preferably with FX for reverb.

Real mixers aren't usually cheap. The ones in Chinese DVD players are though, as a complete player with two microphone inputs and reverb effects is often less than $100. But I had thrown out my old players :-(.

Then I came across the Behringer MIX800 ultra compact Karaoke machine. You can get it from Amazon for US$64. I paid A$109 from an Australian distributor Store DJ. It's good: two microphone inputs with reverb/echo. One line input from your CD/Computer with voice cancellation (which works sort of). Play the karaoke files on your computer using kmid or my Java programs, feed the output to the MIX800, plug in your microphones and send the mixed output to an amp. Easy! No need to mess around with mixing by PulseAudio or other s/w. I'll get the s/w working eventually as I want it, but for now this is a very good and easy solution.

Wednesday 30 May 2012

Found low latency for Karaoke with PulseAudio

As a followup to the last post: I can now play Midi files and sing along with no noticeable latency using PulseAudio. To direct the (default) microphone to the (default) speaker load the module_loopback (thanks to rusty0101):

    pactl load-module module-loopback latency_msec=1

Everything you speak/sing/holler will then be played on the speaker.

For Midi file playback I discovered FluidSynth. The following program will play a Midi file:

// See http://fluidsynth.sourceforge.net/api/

// Run by ./PlayFile /usr/share/soundfonts/FluidR3_GM.sf2 ../54150.mid

int main(int argc, char** argv)
{
    int i;
    fluid_settings_t* settings;
    fluid_synth_t* synth;
    fluid_player_t* player;
    fluid_audio_driver_t* adriver;
    settings = new_fluid_settings();
    synth = new_fluid_synth(settings);
    player = new_fluid_player(synth);

    fluid_settings_setstr(settings, "audio.driver", "pulseaudio");
    // Use paman to find output device's name
    fluid_settings_setstr(settings, "audio.pulseaudio.device",
              "alsa_output.pci-0000_00_1b.0.analog-stereo");

    adriver = new_fluid_audio_driver(settings, synth);
    /* process command line arguments */
    for (i = 1; i < argc; i++) {
        if (fluid_is_soundfont(argv[i])) {
           fluid_synth_sfload(synth, argv[1], 1);
        }
        if (fluid_is_midifile(argv[i])) {
            fluid_player_add(player, argv[i]);
        }
    }
    /* play the midi files, if any */
    fluid_player_play(player);
    /* wait for playback termination */
    fluid_player_join(player);
    /* cleanup */
    delete_fluid_audio_driver(adriver);
    delete_fluid_player(player);
    delete_fluid_synth(synth);
    delete_fluid_settings(settings);
    return 0;
}


And whadda-you-know? It all works fine.

There's just the matter of hooking up a GUI, and a few thousand lines of code. But at least I'm starting from a good base, and I now realise the Java Sound framework can't give me that, sad to say.