Location>code7788 >text

With my more than 10 years of experience as a "weirdo", I'd like to give a few suggestions for blogging in the "hanging" blogosphere

Popularity:508 ℃/2024-08-28 22:48:28

Getting to know the blogosphere for the first time

I was in contact with the development of 08 years, the first involved in the . net and java, remember that it seems to be jar6 to come, net well still 2.0
At that time and still today, a lot of times I find my way to blogland to find information
At first I thought that blogland was an alliance of many bloggers, that is, they each get a blogging system, and then share a common domain name
Why would you think that?
It's because all the blog posts I've seen high look different! A typical one blogger has one set of styles!!!!
Now that I think about it, I think this differentiation is not necessary to exist, you can get some hangings, style style are changed, it becomes a miscellaneous, for the brand degree is not good!
Domestic currently can find technical, blog garden, csdn, nuggets, Zhihu, and other what? Feelings in the technology forum this piece of domestic is really less!
When you're looking for information, if you find blogland, then the answer is probably in the 60th percentile, the
If you find CSDN, I feel like this is in the 30%! Especially that CSDN resource download, what a mess!
Some other unheard of, 1 Chengdu did not, are all chaotic reproduced, the content is incomplete not to mention, the typesetting is also all kinds of problems! It is simply a kind of torture!

Tribute to Technology

Many say that over the past few years, Blogland has retained its dedication to technology
If you ask me, the obsession with wool is laziness.
I don't know if it's just real laziness or if it's just a shy away from the shit mountain code
In the last few months, there have been all sorts of posts asking for help, all sorts of things to be salvaged
I see a lot of people have made their own suggestions, many of which I think are still pertinent
What's the result?
Didn't see anything, at least I didn't see a change in blogland!
So destroy it, don't make excuses for being lazy!!!!
You don't believe me when I say I'm lazy? You think it's the technology that's too hard?

That's all there is to app development.

I've been working on projects since about '09, and the first thing I came across was wince, which I guess a lot of people don't know about.
That thing was on .net 1.0+ as I recall, and was upgraded to 2.0 later on
The earliest mobile pages were not as powerful as the current ones.
The network was still 2g, so you know how much performance saving you need to do to get the page open quickly!
After getting started with webforms, I have successively contacted the development of
winform(CD), yes you read it right not CS is CD, what does it mean, is directly connected to the database, only later to get a S!
Winform is used for the development of the management terminal.
Then the client got that wpf, or net3.5 stuff, wpf is a good thing ah, too bad the launch time is too early!
In order to cooperate with WPF, the corresponding APP is also developed independently.
Android (2.1), I remember this version, then 4.0 was just launched, Android was still hot, that Motorola tombstone phone anyone remember?
IOS(6), I don't remember if it was 5 or 6, but 7 wasn't out yet, why? Because 7 was the first to go flat.
WP (8.1), this estimate is now young people do not know what is the thing, yes Microsoft was once out of several generations of cell phone systems!
Yes you read that right, the above are all independently developed and all developed natively, learning as you go backwards!
The above application you want to think simple, then think wrong, involving the main socket, that is, chat, support for graphic and so on the kind of
Then there's getting them into a whole system!
I encountered more problems is the chat area of the technical problems, that will look for information, a little off the beaten track have to find the foreign language to go!
After finishing the whole thing, I got the feeling that the sword is in my hand, the world goes away! As long as the application development, in fact, the technology is just like that, there are not many things are difficult to get!
So there's nothing wrong with development?
That's still there, it's just in different areas, like the old AI modeling, some of the driver development that's been going on lately.
Like game engines, I feel amazing, but these cutting edge ones have little to do with us, we're users, just a little common!

So what's Blogland doing?

I looked up blogland and it was founded in '04 and now!!!! 20 years!!!
So what has the blogosphere grown in these 20 years?
Is it afraid to take a step forward, or before there is still money to be made, sweetened by sugar-coated bombs, and now to the survival of the out of regret?
There's no such thing as a regret pill!

Taking the first step to save energy and reduce emissions

How have I been frugal? Here are a few things I've experienced

Look at the resources taken up by the server's tools

We are very easy to ignore an element, that is, the tools on the server, I have seen a server 16GB of memory, the results of the business resources only take up 400MB, the other you think it is empty?
No, no, no.
All eaten by the so-called tools, what gitlab, k8s, jenkins, apollo, etc.

Scenario 1.
A: If you write this code like this, it will leak memory!
B:No way, I saw it on the internet, that's how they all use it!
A: ... ... .
Scenario two.
A: Uh, this key into redis how not configure the expiration time ah, that is not not hit the database!
B: I do not know, I took over before this is the case, has been used well
A: I see that the database is the object, just the code does not read, that is not always use redis
B: do not change it, so, can be used on the line
------ After a period of time, due to the server memory is tight, run to empty the redis data ------
B: Why can't this service start? I didn't change anything. What's going on?
Scenario 3
A: This interface return why so slow, but also so large, not much data ah, just a table, 10 data are less than
A: Uh, why the picture is also in there, not all store a url it?
B: Because there is also a server to use, in order to facilitate the picture stored in the database!
A: ... ... A: ...
Scenario 4
A:Less than 100 PUs accessed in a day, then the server memory is full (16GB server)?
B:Let me see... ... .
B:Ok, I restarted some of the services
A:What are these processes for? k8s,jenkins,apollo,gitlab ... ... .
B: deployment services, this is the deployment of management containers, this is the build code, this is the configuration center ... ... ... .
A: Uh, there is a need to engage in this, code services only a little!
B: microservices, are deployed this way!
A: ... ... .
Scenario 5
A:Is there something wrong with this service? There's a memory leak.
B: How do you know? It's been running fine.
A:I've been observing it for 2 days and the memory hasn't been reduced.
B: Let's see... ... B: Let's see.
B: No, it's only taking up 400MB.
A: You upgraded? When I looked yesterday, it was already 800MB.
A: by the docker's rules, reboot, you see, this has been rebooted 12 times!
B: This is not normal access, no matter what.
A: ... ... A: ...

I remember the last time I made a suggestion about the image size, the blog garden default upload when png, I use the default conversion to webp, the image from the original 77KB compressed to 22KB!
And it came back with a what?
The cost of resource traffic for images is only 10 percent
It's true that you've never been a homeowner. A piece here, a piece there, and at the end of the day, you'll realize that it's a lot of money!

Look at the configuration of my server.
It's the 99/year, 2GB RAM, light app server from AliCloud!
Look at what I have running on this 2GB server!

ps aux|head -1;ps aux|sort -rn -k +4|head
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      774800  0.2 10.0 2633064 194916 pts/0  Ssl+ Aug16  40:08 dotnet 
root     1742666  0.0  8.6 2622480 166376 ?      Ssl  Aug26   1:57 dotnet 
root     1347915  0.6  8.1 281684 156796 ?       Ssl  Jul09 436:53 /usr/local/aegis/aegis_client/aegis_12_13/AliYunDunMonitor
systemd+    2371  0.2  7.6 2251832 147600 pts/0  Sl+  Jul03 202:58 /opt/erlang/lib/erlang/
systemd+    2226  0.0  4.8 360052 92776 ?        Ss   Jul03   0:49 postgres: checkpointer 
root        2645  0.0  4.6 3585060 89308 ?       Ssl  Jul03  33:52 dotnet 
root         748  0.2  1.4 856520 28372 ?        Sl   Jul03 174:35 Cms*-Worker start
root         646  0.0  1.2 1321432 24868 ?       Ssl  Jul03   1:59 /usr/libexec/snapd/snapd
systemd+    2196  0.0  1.1 359916 21808 pts/0    Ss+  Jul03   3:34 postgres
root         903  0.1  0.8 474984 15556 ?        Ssl  Jul03 133:08 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P

Do you believe I can still deploy my services on this server using the CI/CD model!
What is CI/CD? It's called Continuous Deployment! As I understand it, it means that you submit your code and the tool deploys the latest code to the server for you!
There's a popular one that implements this, called Jenkins! But my 2GB server is not enough for Jenkins to toss around!

If you want to give a three-way tool rating, then nginx, redis, rabbitmq, etc. I will definitely hit the excellent, as for the other well, depending on the situation, especially in the environment of energy saving and emission reduction in the past few years, the score will be lower!

Thinking about the service code itself

My favorite framework in the last few years is ABPvNext, but not his native one, but his lite version, which I call PasteTemplate, for a project template! This way I can quickly create a new project every time I create a new one!
Why streamlining?
I couldn't use many of the original modules, they were too bloated and slow to start, after streamlining it feels like flying!
And the simpler something is, the less likely it is to go wrong!
Modularization, what you need later and then add back!
Don't think that saving a little bit here and there is not enough! Especially with WebApi, the savings are actually magnified by the nature of the accesses!
For example, if you are able to save 1KB at runtime, then the concurrency you can accept with the same resources will be greater, even up to a multiplier difference!

Boards that don't hurt

So, like a lot of the modules in blogland I feel like I should just cut them out!
Like flash memory? What the hell is this? What was the original idea?
You say he's a chat, right? The basic chat interface doesn't even look like that!
You said he wasn't chatty, right? He can update in real time.
Maybe this board was not designed with that in mind and went off the rails later on
To actually go against the grain, well, either fix him or ditch him!
Do other boards have this problem?

Relevant

And the one that shows how many milliseconds when commenting, what's that for?
You say show off the technology to hang, I feel that there is no bull, are several hundred milliseconds
You said to listen to whether the state of it, you buried a code in the background, beyond how much to send your own cell phone, to a notification can be, so issued to do?
Don't you know it? After replying, the content did make it to the top screen, but the style is different!!!!

UI related

The other modules, having seen a few pages, give me the impression that they were developed in various stages, why? Because the style of each page is different
Looked down the amount of code is not much ah, a lot is the style of the problem, if the technology is so obsessive, then why this daily look at things are not available to change it?

Now what era, after 00 are Ben 25 to go ah, you look at the 90, 00 after the aesthetic
Do you think they'll be receptive to this '04 era style thing you've got going on?

Don't say they're not your clients.
Come like the wind and rain, go like the dust. The waves of the Yangtze River push forward the waves of the past, and the newcomers in the world drive out the old.
The clients you targeted in the beginning will eventually leave you over the years
There is a saying, the company has a mortgage car loan, do something wrong, you can just scold, he did not bring back the hand!
But you know they were newborns in the beginning too!

So you've got to follow the times, and you can never go wrong with change starting with visible UI!

Take the second step and keep the beginning

At a glance, it's full of unevenness, so is there any advantage to it?
At least if I'm looking for information at the moment, it's in my mind if I go into the blogosphere😊
If it is into the next door, then the mood is complicated, if it is that download resources, hey, decisive return
If it's anything else, especially from one of those small sites, I'd hate to be able to remember which shortcut to the browser back button is!

I also very much disagree with the CSDN kind of everything is money play, the actual development of the project, you will find that those so-called paid things, huh, even the door is not into!
Development, you will encounter a thousand strange requirements, a variety of inexplicable problems, you will eventually find the answer, will find the source of the problem, and those so-called practice will not be encountered!
draw an analogy
In one of my previous online customer service systems, the reception ratio for A is 50%, and for B is also 50%.
As a result, the next day, A came running up to me and said, "Your system doesn't work!
I've received 4 visitors and he hasn't received a single one yet!!!!

So at this level of technical information, blogland still has a big advantage!
How can we amplify this advantage?

1.Quick Search

In the place of the blog post, or where necessary, put an input search box, if you can get the keywords that's best, just type them in and then make them clickable for the user, for example
What is PasteSpider site.
Notice the site: at the end. What is it for?
It is to tell the search engine, I only search the source of this website, you just say this function is practical or not!
To make this happen, so you'd have to corral all those personalized UI blog posts
What? You can't take it?
What do you care if you can't even survive!

2.Related Recommendations

I don't know if you guys have noticed, but you go to a certain blog post from the home page
You'll notice that the related links inside the blog post, which are a tags that link to other blog posts, are the same as the home page!!!!
I can't believe it's the same!!!
If it's the same, how do you build your own SEO library link?
That's why I'm going to fix it.
The idea is to extract the keyword of the current blog post and then recommend others based on that keyword in the Recommendations section of the page!
This lets the links of the blogosphere spread out and correlate like a spider's web!

3. Blog post ratings

To realize the effect of the function of 2, you have to introduce another mechanism, the scoring mechanism, the recommendation is based on keywords, and then the second level of sorting is the rating
The ratings say it's easier to know how to do it, but how can you do it better?
a. To have a harmonized scoring mechanism
1. Whether the overview of the article is reasonable, that is, whether the brief title and the content are compatible
2. whether the overall article expresses things clearly, that is, whether it reads smoothly
3. Whether the purpose was achieved and whether the problem was solved
4. Whether or not the principle is pointed out, the answer is often secondary to being able to know where the problem lies.
5. Whether the relevant information is provided with sources, so that others can continue to research, or view other programs
6. if there is context, whether it is linked or not, in fact, whether it takes into account the feelings of newbies
7. Overall layout, whether information such as pictures are provided with sufficient supporting evidence, etc.
Then on the basis of these points, the ratings are made so that each one is probably about right, and you are able to filter out the blog posts that are of even better quality!
Even subsequently, you can correct the keywords of the blog post based on this!
b. To have an incentive
This includes not only limited to page leads, such as thanking the author for sharing, and giving a support with a click of the mouse!
Every month you can engage in a few lucky users, direct gift phone bills and so on, do not be afraid of this expenditure, this is heavy on a surprise, and then the announcement of the next!
c. Motivating better performance
Blog posts with good grades are given more exposure, more referrals, so that good blog posts spread to better people to view them!
I looked at the recent what's-his-name reading ranked version, and a lot of it is non-tech related stuff, and if it were me, I'd like to see a little bit of takeaway from each article
But you go look at the rankings of random issues, and I might as well not read them!
Panning for gold in the sand isn't this tiring!

4. Reading notes

A new board, or a feature, is introduced!
What does this function do?
Restricted his creation end must be FIXED, the layer you call poup!
Why this one?
How many points are there in an article?
For newcomers may be a treasure, for the old bird, a blog post, the key points are often only so one or two, I can not for this sentence collection of this blog post it
This also favorites, that also favorites, finally you will find that your favorites than the home page of the list of blog posts more, that and no favorites what is the difference?
Then change it!
Direct page click notes, or direct mouse selected some, pop-up collection comparison, a blog post, you can collect a number of small paragraphs, and then you can do a note!
You think it's over?
No!
And a whole board, or a small block, for what?
For browsing the list of notes, you can also comment on other people's notes!
What's the end state?
It's that I skim to the point!

There are other suggestions that don't fit here haha!

Taking the third step towards win-win cooperation

Blogland gives me the feeling that there is nothing else but blogland!
It's so wrong!
You've got to have more than one leg to stand on.
What should I do if I'm not skilled?
Collaborate!
There is a blog garden to do endorsement, that even with those outsourcing company's software comparison is also an advantage, the key point is that you refuse to suffer, always feel that other people and your cooperation are taking advantage of you!

For example, mall system, online customer service system, my PasteSpider deployment tool
While everyone is a developer, not everyone can develop these tools
Sometimes it's just a matter of using it and it's not cost-effective to develop it yourself, so who wouldn't opt for it when it's readily available and inexpensive?
Look at it, you're spared the hassle of promotion compared to others!

The last thing you should do is outsource!
A project, do development know, is a bottomless pit, you want to do well, you can always deep plowing, which has no standard, if the customer is not good to talk about, you can not get out of it!
I've encountered one before, let's say it's a module developed for a small car, and he wants to use it on a big truck, so who do you think is going to justify this?
Have not experienced? You wrote a software for windows, someone else bought, after he changed the computer mac system, he said are software for why mac can not be used, you can not develop this ah!

Look at that sponsor.
I wouldn't sponsor it if it were me.
Sponsored, in exchange for an introduction inside a blog post!
If I were blogland, I'd give him an ad space, the kind that shows up all year round.
That way others look at it, nice to sponsor it and advertise yourself!
It's motivation, it's sponsorship!

!!! Taking the first step is the first thing to do to save yourself in the blogosphere!!!!

Wrote so much, please allow me to recommend a few projects, are my own independent development, and I have been using their own projects, are open source, if there is interest can also be private chat me for further cooperation!

PasteSpider (developer-specific deployment tool)

This tool is highly recommended, it's a tool installed on linux that uses docker/podman to deploy and maintain your container services, the current plan is to
The base version is open source, but it hasn't been updated in a while, and it feels like it serves more of a purpose to let people know how the tool is implemented
Professional version of the internal open source, for security, open source I personally think is not the best one, then why have internal open source?
It's mainly for business users, just so you can see if there's anything fishy about the code in there or not, and if it can be used properly!
image

Key Features

What are the main problems that PasteSpider solves? I think there are a few that stand out
1. Save resources, you see my server above the introduction, I have a 2GB server, the realization of the CI/CD, but also deployed to paste the code and related tools, in order to save resources I do not even install Mysql!
2. Non-invasive, quick to get started, and other tools are different, simple point you have to run the service, you can close the PasteSpider, delete it, will not affect the operation of your business services
3. need to use the features are available, developers we often have to repeatedly perform on-line testing, so my recommendation is to compile and publish to the folder on the development machine, and then use the PasteSpiderFile for one-click release, this is much faster than the CI/CD deployment, in a few seconds on the release of the successful!
Smooth upgrade, this must have, through the nginx switching mode, you can realize the senseless upgrade, this requires that your application must have more than two containers running
Route synchronization, based on the implementation of nginx, for example, you have only 2 containers running before this project, now upgraded to run 5 containers, then nginx to upgrade? Now you can release your hands, because this work PasteSpider also did!
Project concept, if you want to set a concept of the project, in PasteSpider you can think of it this way, a domain name to access all services, belong to a project! That is, the use of access to the domain name to divide is not a project!
Project Gateway, server or container restart, the IP is possible to change, so in order to solve this problem PasteSpider introduced the concept of project gateway, that is, within the project to share a common IP segment, the IP restart server will not change!
The concept of environment, simple to understand, is the development environment, engineering mode , etc., combined with the account, you can also realize the division of rights , etc., with the key-val you can use different configurations for different services, this is not the configuration center came!
Reporting data, PasteSpider reads the container running status of the server when it is running (you can also turn it off on the configuration), and by looking at the container's running reports, you can get a good idea if there are any memory leaks and so on!
Service listener, can be based on memory or CPU usage, perform expansion also webhook notification, so that you know the status of the server in the first time in order to make feedback and reduce losses!

WebHook Case

--- Task [notification] report ---
Task Name: Build Mirror
Server: 1 Personal server
Project: 1 Sticky Code
Target Service: 1 Sticky-Code-API
Operating environment: 0 Unknown environment
Execution result: -- success --
Task time: 4s
Task time: 2024-08-26 16:24:19

--- Mandate [notification] reports ---

Task name: Upgrade
Server:1 Personal Server
Project: 1 Sticky Code
Target Service: 1 Code posting-API
Operating environment: 1 Default environment
Execution result: -- success --
Task time:16s
Task time: 2024-08-26 16:24:24

PasteSpiderFile

This is the PasteSpider companion tool, the client used on windows, the main role of the project's differential update, one-click release!
Think about it, how comfortable it is to compile a project and then upgrade it with a click!

PasteSoft (personal website)

Previously there was consideration of crawling data to get a forum, similar to the blog garden, later I dismissed because there is no point!
For what it's worth, it's got another one like it!
I just want to get a forum that I can make my own, [posting code] series, and change it any way I want!
The main purpose is for presenting instructions, problems, updates, operating documentation, etc. for the software that I use to post code sequences!
/Home/Index

PasteTemplate(WebApi project template)

When it comes to PasteTemplate, we have to talk about PasteBuilder (right-click code generator).
PasteTemplate is a lite version from the ABPvNext project, the lite version is to remove all the unnecessary components, so the whole project is very clean!
My project is pretty much created based on the PasteTemplate project template!
!!! !!PasteTemplate will be upgraded with a new version recently to add support for PasteForm!
What is PasteForm? A combination of front-end and back-end CRUD, I would call him CRUD!
Why is he the CRUD?
A normal project, implemented with this, is only 4 pages on the admin side
1. landing page, in fact, this page are not necessarily have to have
2. menu list, here is the management side of the IFrame framework model
3. Data list, that is, we often see a table showing the query data
4. Form page, this page realizes the addition and editing of the form
You must be saying, what are you thinking, a project with 100 tables and you only have 4 pages? That page must be huge!
No, the pages aren't even big enough to remove ,,s and the pages are only a few hundred lines of code!
What are the advantages?
Those of you who know ABPvNext know that he has a concept of Dto in it
For example, UserInfo table, then derived from UserInfoAddDto, UserInfoUpdateDto, UserInfoListDto, UserInfoDto
I add an InputQueryUserInfoModel, that the query is based on this to query, the default field has page size word other is to which to add which!
UserInfo this data model is not external, only Dto external, such as the password field, if you remove him from all other Dto, then is not the password is queried out of this problem no le!
PasteForm is working based on the properties of Dto!
For example, if you add a new UserInfo, you will first get the model properties of the UserInfoAddDto from the interface, such as the type of a field, whether it is required or not, the length, etc.
The data list page, on the other hand, is based on the query's model, InputQueryUserInfoModel, which determines what query items are available!
With such simple logic, what does the Form support?
Text, text sub-input box, text area, rich text (html) and other modes
Images, support single image, multiple images, image width and height limits, etc.
Appearance, which supports the concept of a field being the ID of another table, i.e., the concept of an appearance can be implemented
Switches, using switch or checkbox mode
Numbers, support int,number,double and other inputs, or limitations
Time, support datetime,date,time,daterange and other mode
parameter, based on the url parameter mode, such as adding a sub-article for a .NET category, our general practice is to list the .NET in the category list, click Add, bring the ID of the .NET category to the form to add an article
Extensions, after reading the whole process, you can define for yourself, for example, I defined region support for the applet!

PasteTimer (task scheduler)

This project hasn't been updated in a while, with a PasteTask upgrade behind it!
Let's say you have to mall the api service and you deploy 3 containers, who is going to execute it every hour when you need to collect data to the hourly report?
You then need an external task scheduler to execute it!
Why get your own when there's already something like this on the market?
Can I just say that they are too complicated to write? And I've had memory leaks before!
So it's just a matter of doing your own abundance, and mine supports seconds! Theirs is usually to the minute!
PasteTask is not supposed to be open source because there is a module involved, an interesting one!
If PasteTask is not open source, then PasteTimer will also be updated!

PasteShop (mall platform)

This is not so fast launch, how to say, for performance, we do not even use vue, directly with the template, with the native, if you have to mall use to the advertising and promotion, then this will be very suitable for you, support for very many payment methods, support multi-store, multi-merchant mode ... ... .

There are other projects still in development... ... .