Latest Comments by wojtek88
Wednesday Madness, a few good Linux gaming deals going on
16 Feb 2017 at 8:53 am UTC
16 Feb 2017 at 8:53 am UTC
Quoting: LinasSo does Bundle Stars or does it not sell the actual Linux keys?Bundle Stars sales windows keys only. So guys above did not support Linux gaming at all.
Join me on Twitch tonight at 8PM UTC for some gaming fun
11 Feb 2017 at 6:31 pm UTC Likes: 1
11 Feb 2017 at 6:31 pm UTC Likes: 1
Unfortunately I'm almost never able to join the livestream for various reasons and won't be able to join this time as well. But I'm interested in you opinion Liam regarding Half-Life 2 and also your history with Half-Life franchise. Did you play first one through? If so - when did you do it? Why haven't you finish Half-Life 2 before? What do you think about Half-Life one? What do you think about Half Life 2?
I look forward for the answers and whish you great livestream!
I look forward for the answers and whish you great livestream!
The GOL website source is now open to everyone
23 Jan 2017 at 9:02 pm UTC Likes: 4
23 Jan 2017 at 9:02 pm UTC Likes: 4
Let me add something more Liam:
In general I can see that the code you have is not layered, it looks like every file can do everything -> from accessing request values and producing the output (frontend layer candidate) through manipulating data and calculating things (business logic layer candidate) to accessing database (data access layer candidate).
Personally I would advise strong refactor, because otherwise you won't be able to do fixes in reasonable time. Of course you don't have to start with huge architectural changes, but maybe you can start for example with smaller, per file optimizations.
You use imperative programming approach in each of the files, you avoid functions, you do not use object-oriented functionalities of the language. I would propose that you start to refactor in small steps.
For example I would start with avoiding so much if-else coding. Let take for example file gamingonlinux/admin_modules/add_article.php
There is a piece of code:
Because you use imperative approach, maybe you can proceed with approach that uses functions (one step forward in going to object-oriented world). Don't you think that this piece of code is easier to read and easier to maintain?
P.S. In general I think mixing functions and imperative logic in one file is not a great idea. You can divide it to 2 files (one with function declaration one with logic) or proceed to object-oriented approach (which would be the best I guess, but still, I don't code in PHP so much so maybe more experienced PHP developers can tell more regarding this topic).
Let me know if you want to have such a remarks in this topic and if you are open to code quality improvements in general.
In general I can see that the code you have is not layered, it looks like every file can do everything -> from accessing request values and producing the output (frontend layer candidate) through manipulating data and calculating things (business logic layer candidate) to accessing database (data access layer candidate).
Personally I would advise strong refactor, because otherwise you won't be able to do fixes in reasonable time. Of course you don't have to start with huge architectural changes, but maybe you can start for example with smaller, per file optimizations.
Quoting: liamdaweThe problem is that the code I referred to is in my opinion the best in the project ;).Quoting: wojtek88I have to say that I see very huge difference between code in gamingonlinux/includes/hashids directory while comparing with other code of the system. Object-oriented approach looks much better from my perspective, and I would follow it in the rest of the code.That's not my code, as you can tell from the head of the file. It's also not used any more, so can probably be removed.
You use imperative programming approach in each of the files, you avoid functions, you do not use object-oriented functionalities of the language. I would propose that you start to refactor in small steps.
For example I would start with avoiding so much if-else coding. Let take for example file gamingonlinux/admin_modules/add_article.php
There is a piece of code:
if (isset ($_GET['error']))
{
if ($_GET['error'] == 'empty')
{
$core->message('You have to fill in a title, tagline and text!', NULL, 1);
}
if ($_GET['error'] == 'categories')
{
$core->message('You have to give the article at least one category tag!', NULL, 1);
}
else if ($_GET['error'] == 'shorttagline')
{
$core->message('The tagline was too short, it needs to be at least 100 characters to be informative!', NULL, 1);
}
else if ($_GET['error'] == 'taglinetoolong')
{
$core->message('The tagline was too long, it needs to be 400 characters or less!', NULL, 1);
}
else if ($_GET['error'] == 'shorttitle')
{
$core->message('The title was too short, make it informative!', NULL, 1);
}
else if ($_GET['error'] == 'toomanypicks')
{
$core->message('There are already 3 articles set as editor picks!', NULL, 1);
}
else if ($_GET['error'] == 'noimageselected')
{
$core->message('You didn\'t select a tagline image to upload with the article, all articles must have one!', NULL, 1);
}
}Because you use imperative approach, maybe you can proceed with approach that uses functions (one step forward in going to object-oriented world). Don't you think that this piece of code is easier to read and easier to maintain?
function createMessageMapping() {
$mapping = [];
$mapping['empty'] = 'You have to fill in a title, tagline and text!';
$mapping['categories'] = 'You have to give the article at least one category tag!';
$mapping['shorttagline'] = 'The tagline was too short, it needs to be at least 100 characters to be informative!';
$mapping['taglinetoolong'] = 'The tagline was too long, it needs to be 400 characters or less!';
$mapping['shorttitle'] = 'The title was too short, make it informative!';
$mapping['toomanypicks'] = 'There are already 3 articles set as editor picks!';
$mapping['noimageselected'] = 'You didn\'t select a tagline image to upload with the article, all articles must have one!';
}
$key = $_GET['error'];
$messageMapping = createMessageMapping();
if (isset($key)) {
$value = $messageMapping[$key];
$core->message($value, NULL, 1);
}P.S. In general I think mixing functions and imperative logic in one file is not a great idea. You can divide it to 2 files (one with function declaration one with logic) or proceed to object-oriented approach (which would be the best I guess, but still, I don't code in PHP so much so maybe more experienced PHP developers can tell more regarding this topic).
Let me know if you want to have such a remarks in this topic and if you are open to code quality improvements in general.
The GOL website source is now open to everyone
23 Jan 2017 at 5:41 pm UTC Likes: 4
23 Jan 2017 at 5:41 pm UTC Likes: 4
First of all, great that you went open-source. Congrats!
But, with great power comes great responsibility...
So I will leave my notes here. You can do with them whatever you want :).
Let me start with this sentence - I'm not a PHP developer. I just wanted to see the overall quality of the code.
I have to say that I see very huge difference between code in gamingonlinux/includes/hashids directory while comparing with other code of the system. Object-oriented approach looks much better from my perspective, and I would follow it in the rest of the code.
What's more - I just took a look on one random file and I found commented code (gamingonlinux/includes/crons/itch_games_import.php). I would strongly recommend that you avoid leaving such a stuff in the code - it makes the code very hard to read and it gives no value. If you want to see old portion of business logic, you should find it in the VCS. Leaving it in code is pointless.
And the general note - I see that you tend to use magic numbers and values that have some meaning for you, but it's very hard to find out from the code their meaning while looking at one file. I come from Object-oriented world, so I have Object-oriented manners, but for me it's hard to read file like:
gamingonlinux/blocks/block_comments_latest.php
Where you can find many numbers with some meaning, but without a constant that would suggest the meaning with it's name. And what's more I guess there is a bug:
You test against 55 and assume that string has 65 characters. This is a great sample where constant like "MAX_COMMENT_TITLE_NAME" would help to avoid such an error. There are more places to improve in this file, like having pagination config and reading pagination information from it, etc.
Don't get me wrong Liam, I'm very pleased you've opened the code of the site. I just wanted to share with you my comments, You can do with them whatever you want, I just want to share with you my remarks. Maybe you have your reasons to have different opinion, so we can argue for a moment ;)
But, with great power comes great responsibility...
So I will leave my notes here. You can do with them whatever you want :).
Let me start with this sentence - I'm not a PHP developer. I just wanted to see the overall quality of the code.
I have to say that I see very huge difference between code in gamingonlinux/includes/hashids directory while comparing with other code of the system. Object-oriented approach looks much better from my perspective, and I would follow it in the rest of the code.
What's more - I just took a look on one random file and I found commented code (gamingonlinux/includes/crons/itch_games_import.php). I would strongly recommend that you avoid leaving such a stuff in the code - it makes the code very hard to read and it gives no value. If you want to see old portion of business logic, you should find it in the VCS. Leaving it in code is pointless.
And the general note - I see that you tend to use magic numbers and values that have some meaning for you, but it's very hard to find out from the code their meaning while looking at one file. I come from Object-oriented world, so I have Object-oriented manners, but for me it's hard to read file like:
gamingonlinux/blocks/block_comments_latest.php
Where you can find many numbers with some meaning, but without a constant that would suggest the meaning with it's name. And what's more I guess there is a bug:
if ($title_length >= 55)
{
$title = substr($comments['title'], 0, 65);
//...You test against 55 and assume that string has 65 characters. This is a great sample where constant like "MAX_COMMENT_TITLE_NAME" would help to avoid such an error. There are more places to improve in this file, like having pagination config and reading pagination information from it, etc.
Don't get me wrong Liam, I'm very pleased you've opened the code of the site. I just wanted to share with you my comments, You can do with them whatever you want, I just want to share with you my remarks. Maybe you have your reasons to have different opinion, so we can argue for a moment ;)
Multiple statistics have shown Linux market-share doing better than ever
8 Jan 2017 at 2:12 pm UTC Likes: 5
Of course most of them may end in what you described, but still - it's good for us if people are getting familiar with different distributions and make their own opinions about Linux.
8 Jan 2017 at 2:12 pm UTC Likes: 5
Quoting: SuppenLots of guys who figured out that if they dual boot, they can use Linux for porn, and there will be no evidence of the porn on their main OSHonestly? That's fine by me. At some point they will figure out that such an OS is safe and much easier to use than some of people may think, then they can actually spend more and more time on Linux. And in the end they may decide that they will abandon Windows and focus on Linux.
Of course most of them may end in what you described, but still - it's good for us if people are getting familiar with different distributions and make their own opinions about Linux.
Multiple statistics have shown Linux market-share doing better than ever
8 Jan 2017 at 9:07 am UTC
So if there would be 5% of Linux gamers but half of it would play for example DOOM on Wine and each user on Steam would see a survey at the same time, we would be 2.5%. That's something that is worth to keep in mind while talking about Steam survey.
8 Jan 2017 at 9:07 am UTC
Quoting: [email protected]Steam survey has been proven to be inaccurate.What's more Steam survey can occur on Wine and count you as Windows user (while you actually use Linux OS, but Steam has no information about it because Wine "emulates" Windows under the hood).
It has never popped for me and a user on reddit recently reported that it picked up his OpenGL version wrongly (ver 3.0 instead of 4.3) and it even got his disk statistics completely wrong.
The only thing it's good for is for Meraco to quote.
So if there would be 5% of Linux gamers but half of it would play for example DOOM on Wine and each user on Steam would see a survey at the same time, we would be 2.5%. That's something that is worth to keep in mind while talking about Steam survey.
ARK: Survival Evolved plans to use Vulkan for Linux this year
3 Jan 2017 at 3:17 pm UTC
3 Jan 2017 at 3:17 pm UTC
Wait a minute. Vulkan on Mac? Did I miss something? Do they support Vulkan at all?
Wine 2.0-rc2 released with 20 bugs fixed
18 Dec 2016 at 6:52 pm UTC
18 Dec 2016 at 6:52 pm UTC
The game looks very stable and good performance-wise. When all the functionalities are covered I would be totally ok with the Wine port of such a new game. And it would be awesome if the game would have such a port and Linux sales would be counted. Personally I would buy this game just to show Bethesda that we (Linux gamers) buy games. And we can vote with our wallets.
And it would be good idea to have such a port of a game with Vulkan renderer. It would prove, that games with Vulkan renderer are easy to port and it would be great for all of us.
And it would be good idea to have such a port of a game with Vulkan renderer. It would prove, that games with Vulkan renderer are easy to port and it would be great for all of us.
Linux Gaming in 2016, an end of year review
12 Dec 2016 at 10:14 pm UTC Likes: 3
12 Dec 2016 at 10:14 pm UTC Likes: 3
For me it was a year that I realized that we can only count on Feral ports, Paradox games and indie developers in general. Sad, but that's true. VP didn't focus on Linux this year and Aspyr has abandoned us completely.
Edge Of Eternity, a beautiful indie tribute to J-RPG classics is waiting on Unity & Vulkan
5 Dec 2016 at 8:11 am UTC
5 Dec 2016 at 8:11 am UTC
Quoting: corqI like this approach, transparency for the fans, "this is why there's a delay" and what the circumstances are. Concrete language. I can be patient for a game like this with devs who are straightforward, no stringing along the support base. :DTotally agree. Of course as long as they do not come up with other reason why not to port the game when the initial condition is met.
- GOG did an AMA and here's some highlights - like how they'll continue using generative AI
- Discord is about to require age verification for everyone
- PlayStation Publishing reveal Horizon Hunters Gathering, Guerrilla's new co-op action game
- JSAUX announce a charging-friendly Steam Deck travel case
- System76 plans for COSMIC include Vulkan, HDR, gaming improvements and more
- > See more over 30 days here
- Will you buy the new Steam Machine?
- tmtvl - Small update for article comments and forum posts
- Liam Dawe - Help! Steam ignoring gamepad
- JSVRamirez - Weird thing happening with the graphics
- Ehvis - New Desktop Screenshot Thread
- scaine - See more posts
How to setup OpenMW for modern Morrowind on Linux / SteamOS and Steam Deck
How to install Hollow Knight: Silksong mods on Linux, SteamOS and Steam Deck