Showing posts with label I take it personally. Show all posts
Showing posts with label I take it personally. Show all posts

Utilitarian computing

 

At the center: Cybernetics, Informatics, and Smart System already encompass all the three axes, but respectively have different leanings, i.e. Cybernetics put more emphasis on control, Informatics (the name allegedly comes from information-automatization) put more emphasis in the information, and Smart/Intelligent System put the emphasis in automating the tasks.

Entertainment may serve as another axis: media, interactive computing, playing around with robots of any kind, etc. People can have fun in any way the want, though: from people having fun watching CNC mill to having [simulated] sex on VR.

I badly wanted to add "Entertainment", unfortunately venn4 is not in matplotlib yet; and the interactions can also be quite loose yet complicated just as chatgpt suggested.

Your mileage may vary tho.

PNG what?

Deceptively put PNG header over some video stream. Some ppl took advantage of this to upload their large files to some popular social media sites (which keep PNG files).

 

PySide? 2? 6?

Currently I revisited some GUI programming for some weekends project with some friends at https://github.com/jendralhxr/uget2/. Our go-to python guy used to like guizero, but recently he is trying out tkinter and customTkinter. I have never really tried Tk and later found that customTkinter model-view-controller model is not as fluid as I experienced with Qt.

Hence, I revisited the community-official Qt-Python affairs: (saner person would just call these bindings instead)

 Thankfully, the official-official version has better naming scheme that is self-explanatony: 

But this version was said to be lagged for a while during Qt 5 term, albeit started earlier during the Qt 4 days. Company stuff, I guess.

All the projects are good with wonderful people working behind/on them. But this is what I don't really like with python people: not really considering how to pass on legacies (i.e. not quite respecting legacy code base, compatibility issues with third-party libraries, reluctance to re-study/re-write the code, and the inertial needs to keep the business going with developmental code).

I guess as end user, we can still use them, wisely and adapt to changes, swiftly.

multidimensional array: C/C++ vs Octave/Matlab

I use these two families of programming languages quite often. I did C/C++ first then Octave/Matlab later on. The two differ in how they handle multi-directional array, especially ones more than 3-nest deep.

We know that computer memory uses (virtual?) contiguous address of memory--so by any means they are 1-dimensional. But program (and in this regard, the programming language) needs to map them somehow to fit the continuous address arrangement abstraction.

On 3-dimensional array, with C it is:

unsigned int val[2][4][3];
for (i=0; i<2; i++){
    for (j=0; j<4; j++){
        for (k=0; k<3; k++){
            printf("%d %d %d %p\n", i, j, k, &(val[i][j][k]));
        }   
    }
}

*
0 0 0 00007ff73f2dd040
0 0 1 00007ff73f2dd044
0 0 2 00007ff73f2dd048
0 1 0 00007ff73f2dd04c
0 1 1 00007ff73f2dd050
0 1 2 00007ff73f2dd054
0 2 0 00007ff73f2dd058
0 2 1 00007ff73f2dd05c
0 2 2 00007ff73f2dd060
0 3 0 00007ff73f2dd064
0 3 1 00007ff73f2dd068
0 3 2 00007ff73f2dd06c
1 0 0 00007ff73f2dd070
1 0 1 00007ff73f2dd074
1 0 2 00007ff73f2dd078
1 1 0 00007ff73f2dd07c
1 1 1 00007ff73f2dd080
1 1 2 00007ff73f2dd084
1 2 0 00007ff73f2dd088
1 2 1 00007ff73f2dd08c
1 2 2 00007ff73f2dd090
1 3 0 00007ff73f2dd094
1 3 1 00007ff73f2dd098
1 3 2 00007ff73f2dd09c

*/

See the memory address changes LSB (least significant [4] bytes, lol) based on the variable's LSB (last-shown beacon, I am making up this abbreviation).

With Octave, the story is slightly different. The two pages from the official documentation:
- https://docs.octave.org/v4.0.3/Index-Expressions.html
- https://docs.octave.org/v5.1.0/Advanced-Indexing.html
don't help much as they only give example up to only 2-dimension.

>> val= reshape(1:2*4*3, 2,4,3);
>> val =
ans(:,:,1) =
   1   3   5   7
   2   4   6   8
ans(:,:,2) =
    9   11   13   15
   10   12   14   16
ans(:,:,3) =
   17   19   21   23
   18   20   22   24

>> val(:,1,:)
ans(:,:,1) =
   1
   2
ans(:,:,2) =
    9
   10
ans(:,:,3) =
   17
   18

>> val(1,:,:)
ans =
ans(:,:,1) =
   1   3   5   7
ans(:,:,2) =
    9   11   13   15
ans(:,:,3) =
   17   19   21   23
   

See.... the first index in the element actually iterates first, i.e. the LSB now becomes MSB. It is somewhat nice to have first index as row vector/identifier and second index for the column. But what about third index? Fourth?

Well, sometimes you just have embrace the quirk.



Stages of moral development

Lawrence Kohlberg developed a model of human conscience development on مميز (mumayyiz), one's ability to perceive what's good/proper and wrong/bad.

It has been said there were three stages:

  • pre-conventional stage where right and wrong are determined based on whether something is praised or punished and where an action is chosen based on a cost/benefit, i.e. one is being pragmatic and rational---but life often doesn't encompass only materialistic behavior and both altruistic and manipulative behavior can have skewed scale due to people have different preferences/priorities;
  • conventional stage where actions recognized as good by others are considered good, one follows the mainstream and could be hiding something while retaining the conformist image. This approach is fostering herd mentality, killing creativity and self confidence, and not giving much incentive for one to contemplate on his actions;
  • post-conventional stage where actions based on one's own conscience are good, either he is enlightened or just playing god. Although such approach is needed when the current set of common morality norms/rules has yet to be specifically assigned to one's novel/unique conditions, often in such case asymmetric or lack of information persists and people just have different customs, values, cultures, habits, etc.

To the observation, these three are more of approaches rather than stages as they can happen simultaneously, i.e. conventional approach provides the general evaluation for pre-conventional approach. Although for most of the time they do agree with one another, exceptions do happen--in which we need to tread things more carefully and taking multiple/deeper perspective.

Well, at the end of the day: model is just a model. You chose what fits you best, but you still need to be open for other options (and updates).

marriage advice

Early morning, I placed a rather unscheduled phone call to a big brother.

Thank you for being there, and here back then. We are gonna visit you someday, when the dirt has settled, when the water can quench our thirst. 

We are, already, some steps forwards. Thanks to you too.

github: migrating remote from the old https to ssh

Github no longer allows HTTPS access to the repositories. SSH has been the new style since August last year.

remote: Support for password authentication was removed on August 13, 2021.

I have had an old repo which I had left since two years ago when HTTPS was still the norm there. As now I need to continue some more work on it, the usual git push ritual is no longer working as the remote was still on the HTTPS password authentication.

The way we change it so that remote points to SSH session is:

$ git remote remove origin
$ git remote add origin git@github.com:username/repo.git
$ git push --set-upstream origin main

Make sure your SSH public key is already registered up there in the cloud :)

A tale of two DOIs

10.1155/2013/756912 and 10.3233/SAV-2012-0736

I just happened to stumble upon these two DOIs which refer to the same document. Although the practice is not illegal by any means, it said to be deprecated (since when?).

passings

...in lieu of flowers, please consider donating in her name... to places she once were earnestly affiliated with.

Expert (?)

Expert system (the dumb) has these limitations: common sense, inspiration or intuition and flexibility to apply in the semi-relevant field. Experts (the sensible) decide based on their overall view of the occurred problem, but expert system has not enough information. Experts know their lack of knowledge and the limits of their information in dealing with new problems, but expert systems have narrow knowledge domain and just work when they are developed for specific or very specific problems. (source)

Unfortunately, off-the-shelf education can often make human just an expert system. The actual learning experiences: knowing what works and what doesn't, how and why, conceptualizing concepts across different phenomena; that make human an actual expert.

A man of birds

If only more professors share his perspective on scientific archiving. http://shankarraman.in/2021/03/31/why-i-will-not-review-or-write-for-elsevier-wiley-and-other-commercial-scientific-journals/

My take on this, knowing that sci-hub has already  had such broad impact on scientific dissemination and it won't go anywhere anytime soon, there are some things we can do [prolly] right away to sort things out, harmonizing the need of academia and the openness of knowledge:

  • entrust articles archiving to public libraries, they know how to index things,
  • article processing fees go to paying those librarians (just add a floor to the amount so that if the journals aren't very popular, those librarians can still get by),
  • hire server space from the likes of Google, just like porn sites do,
  • stop making citation counts (IF, h-index, CI, etc) as a measure of how capable a person is in their field; just do an actual interview,
  • start making friends in the academia, exchange emails, do actual discussions!

Academia should realize that scientific reputation goes much more beyond citation counting (it probably tells a bit about the article's in-site readership though, but not much more).

Recovery story

I-35W Mississippi River bridge

After 40 years of a faithful service, she collapsed due to some undersized gusset not being able to bear the increasing load.

 

I-35W Saint Anthony Falls Bridge 

Then the replacement is a well-loved and praised bridge.


Such a story.

A practicioner's view

Bridge maintenance and safety: A practicioner's view

C. Seim is one hell of a guy. :) His paper (talk?) talked about how bridge maintenance progresses from analyses on primary effects (static loading, force balance, material properties, etc.; all that is incorporated into bridge design); to secondary effects (dynamic loading properties, time-dependent [finite element] analysis of the members; towards tertiary effects (material behavior to temperature, resistance to corrosion, bearing durability, the list goes on)

 I have not listed any references, as these are my thoughts alone, based on my own experiences.

That's one smug remarks from him, he deserved it.

I am just so bad with farewells

I, indeed, am.

byte offset to pointer (C/C++)

I had the same question as this guy. I need to add some byte offset to a variable of struct something dataypes.

struct something data, *ptr.
char *helper;

ptr= &data;
helper= ptr;

&helper +offset ; // these two will do the same:
& helper[offset] ; // advances the helper by offset byte
*ptr + 1 will advance by the whole sizeof(struct someting)


pidof

I am still doing
kill `pidof <some thing>`
instead of pkill <the thing>

Am I old shool already?

100 years


I find this song telling about amidst whatsoever conflict happening in the society; people having different stances; our protagonist is trying his/her best to survive, allegedly being helped/manipulated by hands. Well, arts... are always open for multiple interpretations.
 
 



My mom has always been a strong woman. Dad passed away when I was five, she has raised me then on.
I cannot get you close enough
A hundred arms, a hundred years
You can always find me here.

I've been married for a year this day. She said she's gonna cook some chicken soup tonight. Last night, it marked the fist time she recorded 0.7 kg heavier than me, being 6" shorter. We fight quite often, I guess that's just the way we are. :D
And, Lord, don't let me break this
Let me hold it lightly
Give me arms to pray with
Instead of ones that hold too tightly

Also, I will listen to this song together with my kid.
We have no need to fight
We raise our voices and let our hearts take flight
Get higher than those planes can fly
Where the stars do not take sides

4 days: JRM

DOI:10.20965/jrm.2019.p0671

[Received September 19, 2019; accepted September 22, 2019]
That. was. quick.

linux-related music parody

Nostalgic feeling hits me hard.
I've used linux since I was twelve-ish.

Slackware's Pat having financial issues last year.
I am running only Ubuntu boxes.

Windows10 is on my daily laptop.
Zenwalk is on my second laptop, not being used, dual-booted with Windows7.



Time often passes faster than we grow up.

academia is skwd in many ways

Some reading for food for thought: Renewal model in academic knowledge systems 
The cited papers in the paper are also worth following. 

 This is why things like sci-hub is worth keeping: keep academic knowledge open (at least monetarily: no paywall), one-layered (a bit anarchist you might say), and keeping things identifiable.

I am not saying that academic publishing contributes nothing to the academic knowledge system itself, but everyone can actually learn to establish their academic publishing-indexing service themselves for their academic materials. There shall be no thing such as publish or perish, it should be publish for greater good.