Saturday, January 29, 2022

Web3 - next big bang!

 Short article about Web3 - what it is and why I personally think that for the next 3 years it will be must know / must use / must to be in !!

 

 

My plan is to write 5 articles:

 

1. Intro: Web 1.. 2.. 3..   [this one]

2. Layers in crypto.

3. Applications - not only DeFi!

4. Decentralisation

5. Summary - where we are, where to look, why should we join

 

 

 




 

 

 

Web3 is an idea for a new iteration of the World Wide Web-based on the blockchain, which incorporates concepts including decentralization and token-based economics. Some technologists and journalists have contrasted it with Web 2.0, wherein they say data and content are centralized in a small group of companies sometimes referred to as "Big Tech".

 






 

Web 1.0 and Web 2.0 refer to eras in the history of the World Wide Web as it evolved through various technologies and formats. Web 1.0 refers roughly to the period from 1991 to 2004, where most websites were static web pages, and the vast majority of users were consumers, not producers, of content.

Web 2.0 is based around the idea of "the web as platform" and centers on user-created content uploaded to social media and networking services, blogs, and wikis, among other services. Web 2.0 is generally considered to have begun around 2004 and continues to the current day.

 

 

 

Visions for Web3 differ, but they revolve around the idea of decentralization and often incorporate blockchain technologies, such as various cryptocurrencies and non-fungible tokens (NFTs). Bloomberg has described Web3 as an idea that "would build financial assets, in the form of tokens, into the inner workings of almost anything you do online". Some visions are based on the concept of decentralized autonomous organizations (DAOs). Decentralized finance (DeFi) is another key concept; in it, users exchange currency without bank or government involvement. Self-sovereign identity allows users to identify themselves without relying on an authentication system such as OAuth, in which a trusted party has to be reached in order to assess identity. Technology scholars have argued that Web3 would likely run in tandem with Web 2.0 sites likely adopting Web3 technologies in order to keep their services relevant.

 

 





 

To believers, Web3 represents the next phase of the internet and, perhaps, of organizing society. Web 1.0, the story goes, was the era of decentralized, open protocols, in which most online activities involved navigating to individual static webpages. Web 2.0, which we’re living through now, is the era of centralization, in which a huge share of communication and commerce takes place on closed platforms owned by a handful of super-powerful corporations—think Google, Facebook, Amazon—subject to the nominal control of centralized government regulators. Web3 is supposed to break the world free of that monopolistic control.

 

At the most basic level, Web3 refers to a decentralized online ecosystem based on the blockchain. Platforms and apps built on Web3 won’t be owned by a central gatekeeper, but rather by users, who will earn their ownership stake by helping to develop and maintain those services.

 

Gavin Wood coined the term Web3 (originally Web 3.0) in 2014. At the time, he was fresh off of helping develop Ethereum, the cryptocurrency that is second only to Bitcoin in prominence and market size. Today he runs the Web3 Foundation, which supports decentralized technology projects, as well as Parity Technologies, a company focused on building blockchain infrastructure for Web3. Wood, who is based in Switzerland, spoke with me last week over a video about where Web 2.0 went wrong, his vision of the future, and why we all need to be less trusting. The following interview is a transcript of our conversation, lightly edited for clarity and length.

 

 




 

 


 

 

As technology continues to take center stage as a key differentiator for companies, new tech trends for 2022 are beginning to emerge. These trends are largely reflective of the changing realities around us. Successive global lockdowns have opened up a world of possibilities around virtual experiences and digital interactions. The increased urgency around resource scarcity, both human and natural, has also led to the introduction of technology geared towards efficiency and sustainability. These growing trends are part of a larger directional shift of the world wide web to Web 3.0.

 

 

To understand the concept of Web 3.0, we need to take a step back and understand the larger evolution of the internet that brought us to this point.

 

Web 1.0, the original conception of the internet, was a largely static, one-to-many format where users could view web pages but do little beyond that.

 

Web 2.0 introduced the concept of a worldwide community of internet users, encouraging them to form social media groups, interact with each other and create virtual experiences. Web 2.0, the current form of the internet, is still by large the most influential, but Web 3.0 is now slowly coming into its own.

 

Web 3.0 takes the notion of the ‘community and expands it to include community ownership and regulation of the internet as a whole. Three key philosophies are involved in web 3.0 definition:

 

The internet is ‘open’ and is built with open-source software that anyone can create, utilize and modify.

Interactions between users are not governed by a trusted third-party regulatory body.

Anyone can participate, without requiring permission from governments or regulatory bodies.

We can already see many manifestations of web 3.0 all around us. Cloud technology and artificial intelligence are some of the most prevalent forms of web 3.0 today.

 

In 2022, we will become increasingly familiar with the concept of a “metaverse” – persistent digital worlds that exist in parallel with the physical world we live in – Forbes

 

 



 

 


 

Here are **a few of the top technological trends of 2022** that web 3.0 has given rise to.

 

 

 

 

 

1.  Advanced applications of Artificial Intelligence

Artificial Intelligence has arguably been one of the biggest technological innovations of our time. As AI begins to get more sophisticated and closely mimic human intelligence, a new form will gain popularity in 2022: generative AI. Unlike traditional AI models that simply understand repetitive patterns and recreate them, generative AI is capable of producing completely new material. It uses the underlying principle of AI, learning patterns, to identify how input is linked together and uses it to create new content from code, images, text or video inputs. 

One of the biggest applications of generative AI is in customer service. Chatbots of 2022 could be so human-like that it would be practically impossible to differentiate between an AI chatbot and a human rep. AI could also change the way we consume content. Social media algorithms could get a lot smarter with AI and offer more accurate content recommendations. This could deliver even more personalized experiences for customers.

 

2. Low-code application building software

Creating a strong digital presence has become increasingly important for businesses, especially in the wake of the lockdowns. Mobile applications are one of the most important virtual assets a business can have because it’s the closest way to mimic an in-store experience. Historically, however, applications have been expensive to develop. Businesses needed to either have an in-house software development team or enough financial budgets to outsource the project to a vendor. These have acted as strong barriers to entry and have meant that small businesses could not afford to launch a mobile app. But with web 3.0, a number of low-code or no-code app development platforms have begun to sprout. These platforms make it extremely easy to develop an app with little to no coding knowledge required. Usually, they come with preset templates and features and users have to simply drag and drop them to build their app. These services will undoubtedly democratize the development of mobile applications and help businesses engage with their customers online.

 

3. Dominance of cloud technology trends

The cloud was one of the biggest game-changing technologies of 2021 as it enabled businesses to work remotely, from any part of the world. But even as offices begin to re-open, it’s unlikely that we’re ever going to see a shift to old on-premise models again. Global scenarios are unpredictable and businesses need to remain agile. As companies plan for this volatile future, they are more likely to move away from hastily implemented cloud setups to cloud-native platforms. 

The ‘lift and shift’ approach involved using the same organizational processes and simply moving them to the cloud. This approach might have worked as a time-sensitive solution, but they don’t deliver the full benefits of the cloud in the long term. A major focus for CIOs in the coming year will be implementing more sustainable cloud structures that are scalable and flexible. 

One study by Gartner estimates that as much as 95% of new digital initiatives in 2022 will be built upon cloud-native platforms. This underscores the importance of cloud technology in the coming year.

 

4. Secure data fabric

In line with creating flexible and accessible platforms, data fabric is a type of data architecture that ties together different platforms and users. It’s the antidote to data silos of the past that would often result in a loss of critical insights and make access extremely restricted. A data fabric promises greater efficiency and security because data is stored on a secure cloud platform. This minimizes the cost of storing data and ensures the highest level of encryption. 

Think of a data fabric like a self-driving car. When the driver is active then the autonomous mode takes a back seat. If the driver gets lazy and is not too alert then the semi-autonomous mode kicks in and makes course corrections, This is similar to how a data fabric works. It will monitor all data pipelines as a passive observer and once it understands, it will start to suggest more productive alternatives. For instance, a supply chain organization that uses data fabric can keep adding newly encountered data information that can improve decisions based on the newly integrated data. 

To implement data fabric design, new technologies like semantic knowledge graphs, embedded machine learning etc. will be needed.

 

5. Growth of 5G technology

5G technology will ultimately be the backbone that drives all of the above technology trends. 5G networks have a much wider reach than 4G, offer faster internet speeds and even enable heavy code to download seamlessly. 2022 will most likely see 5G enter the mainstream market and become the most widespread form of mobile broadband connectivity. This presents a huge opportunity for businesses. As the new year quickly approaches, CIOs should brainstorm new ways to present their business digitally and new channels that they can open up, powered by 5G technology.

 

 

 

Technology is constantly evolving and these 5 tech trends are just a few of the many we expect to see develop over the next year. As the very form of the internet evolves with the introduction of web 3.0, there’s only one thing that’s for certain: businesses need to respond positively to change and leverage the latest technological advances if they want to maintain their competitive edge.

 




 

Web 2 was boom - lots of new companies emerged, Web 3 will go into the same direction with a possibility to be a much bigger change to our way of living!

Wednesday, October 7, 2020

AI/ML issue

When talking about AI, there is often seen the concept of "one-shot-learning". This is quite a basic understanding difference between small baby learning and machine learning ;-).

In machine learning to create a good quality model, one must provide a large number of sample (train) data.

However, in real life, a small baby quite quickly learns what a cat and a dog look like.

But the most visible example is learning that something is hot:

- on just one sample when the kid burns his hand, he will learn what hot is and will never touch anything hot again - at least not on purpose

- if we give this to existing machine learning solutions - it will need thousands of samples, preferably of hot and cold, to learn and give the prediction "don't touch is hot" ;-)


The answer to this dilemma is "one-shot-learning", where we try to build models that could learn from a single sample.





However, my issue is completely different: my baby was observing me, and the household. She noticed that we put lots of stuff into the trash can. She is interested. And since she is learning by repetition/duplication of what she can see ... currently she puts everything she finds into the bin.

By not breaking her confidence, so she will continue development at high speed;-) How to teach her that whatever she is doing is wrong? Basically: stop. 

The obvious note is: that on multiple occasions, during the day she constantly sees new examples (train data) that this is standard/expected behavior.



Monday, September 23, 2019

Good design instead of big architecture

Architecture: instead of multiple fancy libraries, and overcomplicated pipelines/flows/services/microservices - just write good code.

Just want to share my support to the idea put onto the article from Uber guys :
"Software Architecture is Overrated, Clear and Simple Design is Underrated"

There are few points why I like it, especially since for some time I worked in an environment where managers were always thinking that using fancy jargon, and adding as much as possible different libraries make the solution "better" / "cooler".

Yes, I admit, I'd like to use nice new fancy libraries, but my excuse is I want to be in business and want to learn new stuff, from project/management perspective there is however one issue: at the end of the day - who will maintain that and why?

The second output of this article - if you build good software, then the architect position is .. obsolete. I know it's hypocrisy, on linkedin I use that title - and again my excuse is careerwise perspectives - "architect" is understandable by everyone in the programming world and by the head hunters.



Design patterns - no more

Design patterns - choose good programming language without internal "philosophical" gaps, then you don't need to learn patterns!

Yes, I admit I have aversion to patterns, for a simple reason - if programming language that you choose is good ... you don't need patterns, you don't need workarounds to cover language issues.

In my opinion patterns are just workarounds/cover-ups for language gaps/inconsistency.
It looks like: you build the house on the tree and you forgot to put a ladder, so you cannot reach the doors. Then comes patterns: use ropes, build concrete staircases, etc...
If you spend time on planing tree-house in the first place - no need for workarounds.

Just to be clear yes I'm talking about java - if you want to write a good program you need to know the whole catalog of patterns (starting with GOF). If you compare it to python, scala (tobe checked: kotlin, swift) - no more patterns. There are some suggested good behaviors like use functional instead of OO, but that is your choice/ your style.

I think this is an advantage of new languages - if you want to promote a new language you need to have it clean and easy to learn and use.




Tuesday, May 29, 2018

Ubuntu graphics resolution 640x480 fix

I stuck with 640x480 for some time ... so here is 3 easy steps to fix it:

Note: Tested on ubuntu 16.04 / 17.10 / 18.04 (bionic)



1) go to native terminal

ctrl+alt+F1


2) disable windows manager (step 1)

sudo lightdm stop


3) create new xorg config file (step 2)

sudo Xorg -configure


4) backup old xorg file ... (optional step for peace of mind)

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak


5) copy new configuration (step 3)

sudo mv /root/xorg.conf.new /etc/X11/xorg.conf


6) start lightdm (didn't work for me)

sudo lightdm start


7) reboot - this actually works!

reboot


and that's it ;-)

Saturday, October 14, 2017

Upgrade all pip packages

How to upgrade all installed Python packages at the same time?

pip freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip install -U




Or pip3:

 
pip3 freeze — local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip3 install -U

Tuesday, July 4, 2017

Solution: Ubuntu/Linux vs JDK => Maximum number of clients reached / unable to open display

For work I'm using Ubuntu, and as developer, I constantly use some JDK tools/IDEs, usually it is IntelliJ IDEA, sometimes eclipse, some other specific, like nVidia studios..
I'm typical linux user - so "try it switch off and on" is not the standard way to deal with problems.
From some time when I tried to start some graphical tool I got this error:
Maximum number of clients reached unable to open display ":0"

I hate it and spend lots of time for investigation, went throug all standard:

xlsclients/xwininfo/xhost - which didn't work as they all need access to X (they are clients)  - so typical catch 22

I spend some time on different ubuntu settings for X-org/ file limits etc - everything set properly, all almost unlimited...
then finally by just some good luck I shut down my IntelliJ and ... checked that thousand of resources suddenly disappeared from usage list..


Final solution: you need suckless-tools ;-)

apt install suckless-tools

Tuesday, November 15, 2016

BREW - clean update / upgrade

Another one for future reference: brew
when I did brew update I've used to get:

>brew update
error: Your local changes to the following files would be overwritten by merge:

share/doc/homebrew/Acceptable-Formulae.md
share/doc/homebrew/Bottles.md
share/doc/homebrew/Brew-Test-Bot-For-Core-Contributors.md
share/doc/homebrew/Brew-Test-Bot.md
share/doc/homebrew/C++-Standard-Libraries.md
share/doc/homebrew/Common-Issues-for-Core-Contributors.md
share/doc/homebrew/Common-Issues.md
share/doc/homebrew/Custom-GCC-and-cross-compilers.md
share/doc/homebrew/External-Commands.md
share/doc/homebrew/FAQ.md
[......]

fix for that is:

cd `brew --prefix`
git fetch origin 
git reset --hard origin/master

if reset didn't work sometimes you need to do sudo, just make sure you change owner back to your user...

sudo chown -R user .

then :

brew update
brew upgrade


and all is nice and working cool ...  again ;-)

Monday, November 14, 2016

R - upgrade all packages

  • How to upgrade R?

There is this package, which you can use .... but you must have it installed before new version of R come ;-) - otherwise it is typical "catch 22":
Upgrade from 3.3.1  to 3.3.2 :
install.packages('installr', repos = 'http://cran.us.r-project.org') 
Warning message: 
package ‘installr’ is not available (for R version 3.3.1)


So basically - instead this go to https://cran.r-project.org/ and update using new R.


  • How to upgrade all your existing R packages (libraries)?

Use this command to upgrade all existing packages:

install.packages(
  .libPaths()[1],
  pkgs = as.data.frame(installed.packages(.libPaths()[1]), stringsAsFactors=FALSE)$Package,
  type = 'source'
)
And quick update - to the article ;-) - use this instead:

update.packages()
update.packages(ask = FALSE, dependencies = c('Suggests'))

Have a fun! 

Wednesday, April 6, 2016

Mac OS X - switch off discrete GPU in apps

Hi - just quick one.
I have this program (WriteApp) which is quite cool, but every time I'm using it, it is automatically switching my mac into discrete graphics card mode. This app is not really into anything fancy/ high graphics dependent.
But when I launch Activity Monitor it is displayed as: "Requires High Perf GPU" - which means that my app spur the system to keep the advanced graphics processor active, and thereby drain battery life.


After some research ... I didn't find any solution apart using gfxCardStatus to permanently switch into "Integrated only" mode.

So ... there is a hack:
Open your app contents and inside them should be Info.plist file. Open it and add those 4 lines:

       <key>NSHighResolutionCapable</key>
       <true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
       <true/>

restart your app... and now - no more forcing into discrete mode.

Thursday, October 29, 2015

10 Useful, Yet Paranoid, Java Programmer Techniques

Defensive java programming is a great way to prepare for the inevitable to go wrong -- but it can be just as paranoid as it is useful.

After coding for a while (eek, almost 20 years or so in my case, time flies when you’re having fun), one starts to embrace those habits. Because, you know…
This is why people embrace “defensive programming”, i.e. paranoid habits that sometimes make total sense, and sometimes are rather obscure and/or clever and perhaps a bit eerie when you think of the person who wrote it. Here’s my personal list of top 10 useful, yet paranoid Java programming techniques. Let’s go:

1. Put the String Literal First

It’s just never a bad idea to prevent the occasional NullPointerException by putting the String literal on the left side of an equals() comparison as such:
// Bad
if (variable.equals("literal")) { ... }
// Good
if ("literal".equals(variable)) { ... }
This is a no-brainer. Nothing is lost from rephrasing the expression from the less good version to the better one. If only we had true Options though, right? Different discussion…

2. Don’t Trust the Early JDK APIs

In the early days of Java, programming must’ve been a big pain. The APIs were still very immature and you might’ve walked across a piece of code like this:
String[] files = file.list();
// Watch out
if (files != null) {
    for (int i = 0; i < files.length; i++) {
        ...
    }
}
Looking paranoid? Perhaps, but read the Javadoc:
If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of strings is returned, one for each file or directory in the directory.
Yeah right. Better add another check, though, just to be sure:
if (file.isDirectory()) {
    String[] files = file.list();
    // Watch out
    if (files != null) {
        for (int i = 0; i < files.length; i++) {
            ...
        }
    }
}
Bummer! Violation of rule #5 and #6 of our 10 Subtle Best Practices when Coding Java list. So be prepared and add that null check!

3. Don’t Trust That “-1″

This is paranoid, I know. The Javadoc of String.indexOf() clearly states that…
the index of the first occurrence of the character in the character sequence represented by this object [is returned], or -1 if the character does not occur.
So, -1 can be taken for granted, right? I say nay. Consider this:
// Bad
if (string.indexOf(character) != -1) { ... }
// Good
if (string.indexOf(character) >= 0) { ... }
Who knows. Perhaps they’ll need ANOTHER encoding at some point in time to say, the otherStringwould have been contained if checked case-insensitively… Perhaps a good case for returning -2? Who knows.
After all, we’ve had billions of discussions about the billion dollar mistake, which is NULL. Why shouldn’t we start discussions about -1, which is – in a way – an alternative null for primitive typeint?

4. Avoid the Accidental Assignment

Yep. It happens to the best (although, not to me. See #7).
(Assume this is JavaScript, but let’s be paranoid about the language as well)
// Ooops
if (variable = 5) { ... }
// Better (because causes an error)
if (5 = variable) { ... }
// Intent (remember. Paranoid JavaScript: ===)
if (5 === variable) { ... }
Again. If you have a literal in your expression, put it to the left side. You can’t accidentally go wrong here, when you meant to add another = sign.

5. Check for Null AND Length

Whenever you have a collection, array, etc., make sure it’s present AND not empty.
// Bad
if (array.length > 0) { ... }
// Good
if (array != null && array.length > 0) { ... }
You never know where those arrays come from. Perhaps from early JDK API?

6. All Methods Are Final

You can tell me all you want about your open/closed principles, that’s all bollocks. I don’t trust you (to correctly extend my classes) and I don’t trust myself (to not accidentally extend my classes). Which is why everything that is not explicitly intended for subtyping (i.e. only interfaces) is strictly final. See also item #9 of our 10 Subtle Best Practices when Coding Java list.
// Bad
public void boom() { ... }
// Good. Don't touch.
public final void dontTouch() { ... }
Yes. It’s final. If that doesn’t work for you, patch it, or instrument it, or rewrite the byte code. Or send a feature request. I’m sure that your intent of overriding the above isn’t a good idea anyway.

7. All Variables and Parameters Are Final

As I said. I don’t trust myself (to not accidentally overwrite my values). Having said so, I don’t trust myself at all. Because…
yesterdays-regex
… which is why all variables and parameters are made final, too.
// Bad
void input(String importantMessage) {
    String answer = "...";
    answer = importantMessage = "LOL accident";
}
// Good
final void input(final String importantMessage) {
    final String answer = "...";
}
OK, I admit. This one, I don’t apply very often, really, although I should. I wish Java got it right like Scala, where people just type val all over the place, without even thinking about mutability – except when they need it explicitly (rarely!), via var.

8. Don’t Trust Generics When Overloading

Yes. It can happen. You believe you wrote that super nice API which totally rocks and is totally intuitive, and along comes some user who just raw-casts everything up to Object until the darn compiler stops bitching, and suddently they’ll link the wrong method, thinking it’s your fault (it always is).
Consider this:
// Bad
<T> void bad(T value) {
    bad(Collections.singletonList(value));
}
<T> void bad(List<T> values) {
    ...
}
// Good
final <T> void good(final T value) {
    if (value instanceof List)
        good((List<?>) value);
    else
        good(Collections.singletonList(value));
}
final <T> void good(final List<T> values) {
    ...
}
Because, you know… Your users, they’re like
// This library sucks
@SuppressWarnings("all")
Object t = (Object) (List) Arrays.asList("abc");
bad(t);
Trust me. I’ve seen everything. Including things like
7H6FAH7[1]

It’s good to be paranoid.

9. Always Throw on Switch Default

Switch… One of those funny statements where I don’t know whether to petrify with awe or to just cry. Anyway, we’re stuck with switch, so we may as well get it right when we have to. I.e.
// Bad
switch (value) {
    case 1: foo(); break;
    case 2: bar(); break;
}
// Good
switch (value) {
    case 1: foo(); break;
    case 2: bar(); break;
    default:
        throw new ThreadDeath("That'll teach them");
}
Because that moment where value == 3 is introduced into the software, it’ll come for sure! And don’t say enum, because it’ll happen to enums as well!

10. Switch With Curly Braces

In fact, switch is the most wicked statement anyone has every allowed to get into a language while they were either drunk or lost a bet. Consider the following example:
// Bad, doesn't compile
switch (value) {
    case 1: int j = 1; break;
    case 2: int j = 2; break;
}
// Good
switch (value) {
    case 1: {
        final int j = 1;
        break;
    }
    case 2: {
        final int j = 2;
        break;
    }
    // Remember:
    default: 
        throw new ThreadDeath("That'll teach them");
}
Within the switch statement, there is only one scope defined among all the case statements. In fact, these case statements aren’t even really statements, they’re like labels and the switch is a goto call. In fact, you could even compare case statements with the astonishing FORTRAN 77 ENTRY statement, a device whose mystery is only exceeded by its power.
This means that the variable final int j is defined for all the different cases, regardless if we issue abreak or not. Not very intuitive. Which is why it’s always a good idea to create a new, nested scope percase statement via a simple block. (but don’t forget the break within the block!)

Conclusion

Paranoid programming may seem weird at times, as code often turns out to be a bit more verbose than really needed. You might think, “oh this is never gonna happen”, but as I said. After 20 years or so programming, you just don’t want to fix those stupid little unnecessary bugs anymore that exist only because the language is so old and flawed. Because you know…




Re-print from:  Lukas Eder 

Kowalski: The Rust-native Agentic AI Framework Evolves to v0.5.0 🦀

  TL;DR: Kowalski v0.5.0 brings deep refactoring, modular architecture, multi-agent orchestration, and robust docs across submodules. If yo...