nhex

  • Newbie
  • Posts: 15
  • Trades: 7
Re: What's up at Lestrade's?
« Reply #90, on March 29th, 2017, 10:30 AM »
Hey, my notifications seem stuck at 2 - I'm guessing because I have 2 offers that haven't been read?
Also I'm a little unclear about how to redit my tradeables/library or resync w/Steam.

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,396
  • Trades: 222
Re: What's up at Lestrade's?
« Reply #91, on March 29th, 2017, 11:37 AM »
1/ How notifications work:
- The number on them indicates how many notifications you haven't read yet. An unread notification is a notification you haven't followed up on, e.g. clicked the link or clicked outside the link to load a preview. (Yes, there's a preview for offers, too. They will mark your notification as read, and your offer will be put into Pending mode, as opposed to Unread.)
- If the number is on an orange background, it means new notifications were sent since the last time you opened the notification popup.
- To decrease the number of notifications, either expand all previews, or click the 'Mark as read' link on the popup. Your notifications will be hidden, but you can still them by clicking the 'Latest' tab in the popup.

Yes, it's a pretty solid system. Not perfect, but I never do perfect, I strive for perfection and do good enough. That's my motto. :P

2/ Editing lists can be done by going to a game page and clicking the Add/Remove buttons below the game banner, similarly to Barter. I will implement site-wide editing as soon as I'm done with all the fixes I have to do to the website because of the server move. (Not that the new server is particularly buggy, but since I also maintain the public source code of the framework behind Wedge, I need to accomodate for all types of platforms, and being on a new platform allows me to ensure it works great for those platforms as well.) (THANK GOD I'm not behind Nginx anymore, though... I'm never, ever touching that again in my life!!)

3/ Syncing libraries with Steam was disabled last weekend I'm afraid. I should be able to re-enable it but I'm tired, and I'm wary of doing a mistake that could break user libraries. I'd need to back them up first, and it's the biggest table on the site, so... Just being careful.

As a reminder, the site is currently in early beta. I'd say around v0.5 or so. I consider I've done half the done before I can call it 'feature complete'. After which I'll work on further iterations. Hopefully for many years. :)
Re: What's up at Lestrade's?
« Reply #92, on March 29th, 2017, 03:36 PM »
NEW: When sending an offer, LT will now show x0 quantity tradables/wishlists in the list, disabled, with a mention saying that's a no-no. Just for information-- and in case you want to try & convince the user to trade those items with you.

Sorry, nothing 'usable' for a trade, but I've just resumed work after fixing the last few annoying bugs due to the server move. (There's still one around, but it won't affect anyone, so it's fine, and only devotee can fix it I think.)
Re: What's up at Lestrade's?
« Reply #93, on March 29th, 2017, 06:56 PM »
FIX: Notification popups could end up being unscrollable due to a CSS issue.

FIX: the offer system was (quite a bit) broken for a few hours today, due to some refactoring of the offer creation page. My apologies! (I'm preparing to add non-wishlisted items, in case you're wondering. Still needs a bit of work..)

chaosfrost

  • Newbie
  • Posts: 9
  • Trades: 17

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,396
  • Trades: 222
Re: What's up at Lestrade's?
« Reply #95, on March 29th, 2017, 11:52 PM »
If it's empty, it's not in the database. I've checked and currently LT is up to /i/33509 when it comes to Barter game imports. Drudes in like 33677 or something, so it'll be in the next batch of additions. Just keep looking..?
I could rewrite the scraper right now to scrape exclusively from Steam, but it would mean spending a couple weeks on that, rather than, I don't know, finishing the offer system... :^^;:
Re: What's up at Lestrade's?
« Reply #96, on March 31st, 2017, 01:31 PM »
In the last couple of days I added plenty of very minor features, mostly fixes, and didn't bother to mention them.
I also forgot to mention that game pages now mention all offers involving you that contain the game. Completed offers are still shown separately, but technically it'd be simpler to show them alongside the rest. Dunno what you think. If you do a lot of offers for a specific game, their page will be filled with those every time you visit it, so I'll have to devise some extra HTML/JS to allow you to hide & show all declined/expired offers. Someone will just need to remind me because right now I'm gone to other areas.

I also started work on tagging games. The thing that's slowing me down is the ability to tag multiple copies of the same game differently. Well, when you see how it turns out (I think it'll be... nice?), you'll understand why I had trouble.
After that, it'll be easier to allow tagging from list pages.

I'm also trying to tweak the offer notifications, more precisely by e-mail. I noticed yesterday that e-mails weren't sent immediately. I looked into the code (which I only partially wrote), and didn't see anything peculiar, except from one variable being unset right before testing for its existence. Looks like debugging code to me but it was like that when first committed, ahah.[1] So I moved that to later in the code and I'm waiting to see if it helps. Well, I'm not receiving a lot of offers, so... You know what to do :P

What else..?

Oh yes, I'm working on importing the most recent bundles. I figured I'd do it in reverse, latest first and oldest last. It'll be more useful. Once I'm done importing (which requires rewriting my scraper, which was really built for a 'one and done' task), I'll work on the ability to add bundle items directly to your lists. I'd like to know, though, if you guys think it'd be useful to add a flag to those games indicating the exact bundle where they're from (rather than just the store they're from). I'm wary of that, as it does mean adding more data to the database. Plus I'd start wondering "should I allow for wishlists to have that flag as well...?", and then I'll go mad. Bwuhuhahahuhhahuhuhahahauhuhu.
Tell my car I love her. Blue daffodil over & out.
 1. Seriously, that piece of code initially seems brilliant, but then you realize it's the perfect example of object-oriented programming gone mad.

/u/humpaaa

  • Full Member
  • ▶ ¦ Yep
  • Posts: 190
  • Trades: 10
Re: What's up at Lestrade's?
« Reply #97, on March 31st, 2017, 01:43 PM »
Any thoughts on enabling a "sync Lestrades lists with barter lists"-feature?
The numbers in the URL's still match, don't they?

Keeping both lists up to date separately by hand really seems like unneccesary trouble.
Quote from Lestrade 尚 on March 31st, 2017, 01:31 PM
I'd like to know, though, if you guys think it'd be useful to add a flag to those games indicating the exact bundle where they're from (rather than just the store they're from).
Personally, i don't see me using that feature.
Is ee the value it adds, but it's nothing i personally would deem necessary.

joaoarena

  • Jr. Member
  • Posts: 99
  • Trades: 26
Re: What's up at Lestrade's?
« Reply #98, on March 31st, 2017, 01:53 PM »
Quote from Lestrade 尚 on March 31st, 2017, 01:31 PM
I also forgot to mention that game pages now mention all offers involving you that contain the game. Completed offers are still shown separately, but technically it'd be simpler to show them alongside the rest. Dunno what you think.
It is a great idea. Very useful!
Quote from Lestrade 尚 on March 31st, 2017, 01:31 PM
I'd like to know, though, if you guys think it'd be useful to add a flag to those games indicating the exact bundle where they're from (rather than just the store they're from).
The more info the merrier, for me at least! It is hard to find a game inside tons of bundles. The way it is now, I have to check elsewhere where the game was bundled, and the name of the bundle.
Great work you are doing!
My real wishlist is on steam.
My wishlist here is for trading purposes.
I like to trade for games I do not own based on Want/Have Ratio, rather than other approaches.

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,396
  • Trades: 222
Re: What's up at Lestrade's?
« Reply #99, on March 31st, 2017, 11:54 PM »
FIX: The search engine was a bit broken, as you all know. It would narrow results down too much when typing more letters. I finally found the reason for the problem-- the code to narrow the search down was written with member search in mind, and only kept a result if the exact beginning was your search string. I've modified it to instead behave the same way as the alternate path does: take each word you typed in the search box, and make sure each of them is part of a game's name. It's slower than the previous bit of code, by a few milliseconds. I'm really sorry about that. (No I'm not. I'm sorry for the half-broken search, though.)
Quote from /u/humpaaa on March 31st, 2017, 01:43 PM
Any thoughts on enabling a "sync Lestrades lists with barter lists"-feature?
Again: it's technically impossible.
What I *could* do is load your Barter tradables, compare each of them with LT's, then offer to add games it couldn't find at LT's, and remove games that are at LT's but not on Barter. But again, it wouldn't be able to take multiple entries of a game into account. Well, it could, but that would make it even harder to sort out list modifications. Also, a single game's quantity can be set to different values. And even if the value is x1, it's pretty compicated. Let's say I have Firewatch on both LT's and Barter. Now I'm trading my copy of my game at LT's. I no longer have a copy. Let's sync with Barter. It says Fiewatch. Okay. So the question is now, is that a NEW copy that was recently added to Barter, in which case I should import it, or is that the copy I traded on LT, therefore needing to be ignored? So, Lestrade's now has several possible actions: ignore the game (which is silly), add it anyway (which is also silly), or the realistic one: load LT offer history, see how many copies of that game I possibly traded. Then check the last time LT imported Barter data. Then LT can determine the number of copies you had before your last sync. At this point, it has two choices: if you traded your copy at LT's after the last sync, then Barter's copy is likely (but not 'certain') to be the copy you traded, in which case we'll ignore it (and it's up to Barter to sync with LT and remove that copy), or you traded your copy before the last sync, in which case it's very likely the game should be added to the database again.

I'll let you imagine the complexity of adding this code, having to ask users for their opinion on all games that different in quantity (that would be a relatively complex UI and writing good UI isn't my strong suit), and having to keep track of the last time you synced with Barter, once for each different list. Not only that (!), but in order to make things realistic, Barter would have to do the exact same thing for its tradables, in the opposite direction. There's another alternative, sending each other completed offer data, but that wouldn't take care of items you added manually... So, we'd have to send each other, in real time, every single addition or removal we do (either manually or automatically) to our lists. And because networks are what they are, it can't be guaranteed that all data will be transmitted properly. For instance if one of the sites is down for an hour. So in that situation we need to create an update queue where additions and removals are temporarily stored, and sent regularly to the other site until it acknowledges it received the data. But we'd also have to enable an acknowledgement queue, just in case a network issue prevented sending confirmation to the other site. And finally, if we receive the data but there's a bug on the local website, we could get corrupted data that's seen as 'correctly transmitted', or even funnier, site crashes while attempting to add data, then all games being added in that moment get lost, probably without your knowledge of it.

So, in our realistic situation (i.e. all lists are perfectly synced in realtime), we find ourselves with a *monstruous* codebase just to implement the basic feature of syncing our lists. I know I won't write that, because I have more important things to write first, and I doubt the Barter admin would write that, because I'm not sure he'd think himself capable of building a network-fool-proof syncing mechanism.

Let's think about it again in a year's time, okay...?

There's also the possibility that someone would want to write user scripts to accommodate for these problems, but they'd have to keep all syncing dates in storage, and account for all situations I listed above from the top of my head (a word which here means "I'm sure there are plenty more ways to break sync.")
What you wanna do is maintain one list thoroughly and then update the other one from time to time. My Steamtrades list is far from complete, I try to put most of my unbundled (or rarely bundled) games there, because that's what gets traded the most at ST, and my bundle games can stay on LT.

I wouldn't have been able to automatically sync forever between Barter and LT like I did in February and most of March, because the moment you become able to edit your LT lists (and send offers), then it's no longer a simple game of scraping Barter for list data. You can't have your cake and eat it, if I may say.
Quote from /u/humpaaa on March 31st, 2017, 01:43 PM
The numbers in the URL's still match, don't they?
No, game IDs match, not tradable IDs. That's where it counts. But even if I did sync only by game ID (thereby destroying all metadata regarding quantities and stores), I'd still have the problem of having to determine whether the non-matching quantities for your games are due to the addition or removal of one game on one side... But which one, eh?
Quote from /u/humpaaa on March 31st, 2017, 01:43 PM
Personally, i don't see me using that feature.
Yeah it was useless anyway-- you'll understand when you start using the bundle game importer.

Which reminds me I still haven't finished writing the new bundle update script, AH AH...
That's always my problem with forums: either I answer thoroughly and hope it'll help, or I work on the code itself. I just spent half an hour explaining why I can't do syncing, but maybe someone will figure out a way to do perfect sync in less than half an hour. :P

Quantum

  • Newbie
  • Posts: 30
  • Trades: 4
Re: What's up at Lestrade's?
« Reply #100, on April 1st, 2017, 12:59 AM »Last edited on April 1st, 2017, 01:05 AM by Lestrade 尚
I would be perfectly fine with an option to delete all my tradeables and import them afresh (i.e. from Barter or even the export format Barter generates). I'd just do that once in a while.
(:edit: Removed useless giant quote of long post.)

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,396
  • Trades: 222
Re: What's up at Lestrade's?
« Reply #101, on April 1st, 2017, 01:09 AM »
I can do it manually but not automatically. It would be a real mess. It would also automatically cancel all your offers, and even your previous offers could end up being unreadable because of changed tradable IDs.

Note: I just remembered that Barter never deletes its tradable entries. Maybe the admin (I still hate not even having a nickname to address him... -_-) could do an API that returns tradable IDs. That way I might be able (not sure) to keep track of tradable IDs from Barter (but that does imply an extra column to my tables >_<) and it'd be easier to sync. There would still be a problem with quantities, of course. And that I don't want to have too many columns. Eventually slows everything down.

Bed time.

(And I hate that this Barter sync thing is getting asked so much. I know we share most of our userbases, but why doesn't anyone ask SteamTrades to sync with Barter as well? And why shouldn't it be Barter that bothers syncing with LT? :P)
Re: What's up at Lestrade's?
« Reply #102, on April 1st, 2017, 03:44 PM »
UPDATE:
- Search engine will now sort results in a slightly less dumb way. It's not perfect (type "one pi" and it'll show you "Half Life 2 Episode One before One Piece), but it's probably better than before, where I sorted by most recent Steam additions first.
- Added a thumbnail next to game titles. Your mileage may vary. I like it, but it loses the 'fast query' aspect of it, because it has to load the thumbnails from Steam. Then again, not having to always read the text can make up for it. I don't know. Opinions welcome.

Yeah, I know, none of you want me to focus on the search engine... I'm still working on the rest, it's just that I use that damn search engine a lot to test my other features, and it always hurts my eyes a bit. :^^;:
Re: What's up at Lestrade's?
« Reply #103, on April 1st, 2017, 04:47 PM »
Quote from ☺☺☺ on April 1st, 2017, 04:04 AM
Like you said yourself several messages ago:

-Scrape/export the Tradables list (or whichever other list) from Barter, but don't even attempt to code any automatic item add/removal logic. instead:
-just compare the list against the equivalent list here AND print a list of items that are different using this simple criteria: "items that are listed at Barter but not here" AND of course there should be "Add to Tradables" button next to them.
Hmm, yeah, that may be a thing I can do.
I'd still have to bother with quantities, though...
Quote from ☺☺☺ on April 1st, 2017, 04:04 AM
This way, it's super simple task of just comparing the itemIDs between the 2 lists, and some fairly simple filtering of the results. The complexity goes away when leave the adding/removal part to be the users' responsibility.
I suppose so. But it won't be realistic until I add the mass-edit feature to lists. Which won't happen until I have a single-edit feature for game pages (to tag, modify quantities, etc.)

One thing I didn't realize when I opened the trading system to the public was that I couldn't 'play' with game lists anymore. Previously, if I broke something, I could just reset it from a backup or just wait until the sync was done automatically again. Now it's likely to eliminate offers sent between a potential backup and the moment I screwed up... Ah well, I can always backup the table right before I run a test, right? Well, I for one wouldn't like that. :P

It's one of the reasons it's not going as fast as I'd like right now. Just look at the notification system. It works fine, except it doesn't frigging send e-mails all the time. But now that there are thousands of trade offers flying around, any change can have a drastic effect.
I didn't write the initial code (which was quite messy, although I do appreciate and respect its author Dragooon), and I've had to rewrite it several times. At one point it was deleting a user entry from memory, then immediately testing that user entry (!!) to see if it was empty or not.[1]
From what I'm seeing right now (even after that fix which I hoped would fix e-mail notifications), it looks like notifications don't get sent if you still have an unread notification in your popup. Except that in this code, an "unread notification" is a notification for which you haven't read the preview. So, if you receive a "like" on a post, you open the popup, you see someone liked it, cool, you close the popup... That's it, you won't get any further e-mail notifications until you come back and click 'Mark as read' (which is my convenient addition for those who got too many notifications recently.) Worse, e-mail notifications are all disabled by default. I wouldn't enable like notifications by default of course, but it's not particularly easy to find these settings, and having to find it and enable it separately is daunting, for a noob-friendly website.
I'm thinking I'll just modify my code to check if it's an offer-related notification, and if yes, and an e-mail address was entered, forcibly send a notification.[2] And yes, I'm going to meet another problem: "Okay man, I don't want your notifications!!!"... But why did you enter your address then :P So I'll probably do it. If too many users complain, then I'll restore it to disabled by default, and I'll try to make it clearer where to set this up.
Quote from ☺☺☺ on April 1st, 2017, 04:04 AM
I think the priority should be to make the list syncing possible in the first place, and then improve it at later time as a separate project if feel like.
The priority should be to help Lestrade's stand on its own. , not reference Barter for everything. Personally, I have no plans to trade over there anymore, and I don't get why Barter wouldn't offer the ability to import its lists from LT's. :P
I don't know about you, but regardless of the Barter admin's good will, I have no plans to trade over there anymore. (The last offer I sent was 5 days ago, and even then it was at best a way to compare something between our two offer systems.)
I want to find a good balance between helping out users and wanting to put LT first.
Quote from ☺☺☺ on April 1st, 2017, 04:04 AM
This would be totally doable with userscript also, in case Nao isn't too interested to implement this on-site. Anybody out there who wants to do it? If not, I guess I could do it sometime in the near future...
Well, this would allows me to focus on more important parts of LT (according to me at least).
Quote from ☺☺☺ on April 1st, 2017, 04:04 AM
(edit: actually I have already made very primitive script for my own use that does the job for Steam items, but there is no proper GUI (yet because of course I don't need such myself), so I'm hesitant to release such version some might find too technical to use)
You know what, you should do it. Know why? Because anyone who's used a user script to fix Barter before *is* already a frigging nerd. :P
 1. For the curious: https://github.com/Wedge/wedge/blob/master/core/app/Class-Notification.php#L220
 2. Unfortunately, there are only 178 users who bothered to enter one... So, it's like 700 users don't care. :P) (And no, I can't get their e-mail address automatically, Steam doesn't provide it, thankfully. It *should* be on a voluntary basis.

/u/humpaaa

  • Full Member
  • ▶ ¦ Yep
  • Posts: 190
  • Trades: 10
Re: What's up at Lestrade's?
« Reply #104, on April 1st, 2017, 05:21 PM »
Quote from Lestrade 尚 on April 1st, 2017, 04:47 PM
I'd still have to bother with quantities, though...
I think having to fix quantities manually after syncing is a far less annoying thing then having to keep the lists up do date manually completely.
Tbh, to me the lack of a syncing function is a huge concern at the moment, and should be top of the priority list.