Brad Fitzpatrick ([info]bradfitz) wrote in [info]news,
@ 2000-11-29 10:02:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Friends views
I rewrote all the friends view code last night. It's so clean now. There shouldn't be any more random "my friends don't show up" bugs, and it should be much faster. If nobody notices any problems in the next few days I'll be able to remove a bunch of transitional code I had to keep in to be safe, and then things will be even faster. (The code I kept in was to maintain the state that the old friends view algorithm needed..... it's not used anymore, but it's still being updated. I kept it in case we had to go back to the old code.)

But here's the coolest damn thing about the new code.... it doesn't generate your friends list ahead of time, which required that you only had one set of friends. With the new code the server's able to show you any set of friends just as quickly. What this means is that you'll soon be able to have different sets of friends, and only show certain ones. And with each set you'll be able to scroll back 400 entries or so, instead of 75. (did anybody notice that the scoll-back limit is now 400?)

What I plan to do is attach meta-data to your friends groups. Currently you can only edit friend groups in the Windows client, and Evan's adding support right now to the Linux client. I'll make it editable on the web and then you'll be able to mark groups as public or private. With public groups there will be a drop-down or links on the friends view and you'll be able to filter your friends list based on the group. Also, there will be meta-data on each of your friends so you'll be able to select for each one: does this friends show up by default on my friends list (when no group is selected)? do I get email when this friend updates? etc, etc. The good part is that people won't have to create new LJ accounts anymore just to have different friend groups... I hated that. It's just not clean.



(Post a new comment)


[info]rhiannonstone
2000-11-29 10:08 am UTC (link)
HOORAY for multiple friends lists!! You rock, mr. bradfitz sir.

(Reply to this)

A agree with <a href=http://www.livejournal.com/users/rhiannonstone/>Rhiannonstone</a>
[info]voodoolimbo
2000-11-29 10:10 am UTC (link)
You do indeed rock.

By the way, did you get your present yet?

~A

(Reply to this) (Thread)

Re: A agree with Rhiannonstone
[info]bradfitz
2000-11-29 10:15 am UTC (link)
Hmm... what present?

(Reply to this) (Parent)(Thread)

Re: You know, I hate it when I forget about that change in HTML...
[info]voodoolimbo
2000-11-29 10:28 am UTC (link)
ANYWAY, Check your amazon.com listing...

Hope the address is up to date there...I got you something off your wish list in appreciation for keeping up with Live Journal.

~A

(Reply to this) (Parent)

Woohoo!
[info]tigerseye
2000-11-29 10:12 am UTC (link)
Brad kicks ass!!!!
What's it like being a genius Brad? hehehehe

(Reply to this) (Thread)

Re: Woohoo!
[info]bradfitz
2000-11-29 10:14 am UTC (link)
Let's wait to see if things work before getting too excited. :-)

(Reply to this) (Parent)(Thread)

Re: Woohoo!
[info]tigerseye
2000-11-29 10:28 am UTC (link)
*SWOON* the god of LJ spoke to me! me...wow..I'll keep this email forever......lol.

You work too hard!!
but
..i'm glad that you do, thank you.

(Reply to this) (Parent)(Thread)

Re: Woohoo!
[info]cogsinister
2000-11-29 10:41 am UTC (link)
Fancy seeing you here :)

(Reply to this) (Parent)(Thread)

Re: Woohoo!
[info]tigerseye
2000-11-29 10:47 am UTC (link)
Fancy! I wanna know if I get you for that 40 quid?
HA! LOL

(Reply to this) (Parent)(Thread)

Re: Woohoo!
[info]cogsinister
2000-11-29 12:20 pm UTC (link)
Get your coat.....youve pulled !!!
:)

(Reply to this) (Parent)

Re: Woohoo!
[info]absolution
2000-11-29 10:56 am UTC (link)
(laughing)

oh, dear.

(Reply to this) (Parent)

Woohoo
[info]delusionalangel
2000-11-29 10:20 am UTC (link)
Brad needs a super vacation someday :P

(Reply to this)


[info]blythe
2000-11-29 10:33 am UTC (link)
Baby, you're my hero. ;-)

(Reply to this)

It's been *awhile*...
[info]moraxian
2000-11-29 10:41 am UTC (link)
...since I set up my LJ, where can we set this:

>>And with each set you'll be able to scroll back 400 entries or so, instead of 75. (did anybody notice that the scoll-back limit is now 400?)<<

Thanks,
M

(Reply to this)

Woah
[info]delusionalangel
2000-11-29 10:49 am UTC (link)
It no longer shows you your own protected entries when you view the friends page of someone who has listed you as a friend? I kept wondering where my last entry was *duh*

No more people asking if everyone can see their friends only posts because they see them on a friends page.

(Reply to this) (Thread)

Re: Woah
[info]bradfitz
2000-11-29 11:36 am UTC (link)
whoops, that's a bug.

you should be able to see those.

(Reply to this) (Parent)(Thread)

Re: Woah
[info]delusionalangel
2000-11-29 11:45 am UTC (link)
WooHoo I found a bug and you managed to confuse me for a minute all at the same time ;)

(Reply to this) (Parent)(Thread)

Re: Woah
[info]bradfitz
2000-11-29 12:00 pm UTC (link)
it's fixed now.

(Reply to this) (Parent)


[info]bandicoot
2000-11-29 11:13 am UTC (link)
Outstanding, Brad! Thanks! Now Visions has even more work to do to bring the Windows client up to date, heh!

(Reply to this) (Thread)

Re:
[info]the_chuck
2000-11-29 11:46 am UTC (link)
maybe some of us can use it this time around. -_-

(Reply to this) (Parent)(Thread)

Re:
[info]bradfitz
2000-11-29 12:00 pm UTC (link)
visions aspires to work at microsoft.

if his client doesn't crash often, how would he expect to get a job there? :-)

(Reply to this) (Parent)(Thread)

Re: Crashes?
[info]gdj
2000-11-29 12:15 pm UTC (link)
I have never had the windows client crash!

Am I luck or what?

(Reply to this) (Parent)(Thread)

Re: Crashes?
[info]visions
2000-11-29 04:39 pm UTC (link)
nah, your system just has updated msvcrt files (mfc runtime).

(Reply to this) (Parent)


[info]visions
2000-11-29 04:38 pm UTC (link)
LIES!

i dont want to work for microsoft, it sucks there.

secondly, it is not the client that is crashing it is msvcrt.dll's heap memory manager that is crashing. people that are broken, have old versions of msvcrt.dll...

see this for a potential fix

(Reply to this) (Parent)(Thread)

Re:
[info]bradfitz
2000-11-29 05:10 pm UTC (link)
hrm.

how come the old client never crashed? what changed?

(Reply to this) (Parent)(Thread)


[info]visions
2000-11-29 05:49 pm UTC (link)
different service packs on visual studio perhaps? more intesive memory access.. etc etc.

the heap allocator changed in the service packs on visual studio.

(Reply to this) (Parent)(Thread)

hrm.
[info]bradfitz
2000-11-29 05:59 pm UTC (link)
more intesive memory access

I guess. if "intensive" is defined as accessing memory that isn't yours ... that you never allocated.

seriously dude, I think you've just got a bug and it happens to not manifest itself on some machines because you're getting lucky... I don't argue that the heap allocator changed, but perhaps it changed for your benefit. in other words, maybe now the memory you allocate isn't padded with information that you're overwriting, so it's crashing, but before the padding was different such that an off by one error wasn't visible.

you've made some nice changes to the client, but you too easily jump to conclusions and you like to blame microsoft for all your problems.

I really hoped I'd never have to work on the win32 client again, but it looks like I might have to... the linux client is starting to do a lot of things the windows one can't, because the windows one can't even run on a lot of people's computers. :-(

(Reply to this) (Parent)(Thread)

Re: hrm.
[info]visions
2000-11-29 06:16 pm UTC (link)
the only place an off by one issue could crop up is here...

LPTSTR str = m_password.GetBuffer(m_password.GetLength());
LPTSTR key = new char[m_user.GetLength()+1];
strncpy(key, (LPCTSTR) m_user, m_user.GetLength()+1);
LPTSTR orig = key;
while (*str) {
if (!*key)
key = orig;
*(str) -= 'a';
*(str++) ^= *(key++);
}
m_password.ReleaseBuffer();
delete[] key;

----------

do you see an off by one error there?

and in regards to features that the linux client has that the windows one doesn't... i have 2 things to say about that. one, i was on vacation. two, you and evan add changes/new features to the client before you even post them as being available, so of course it should be ahead.

(Reply to this) (Parent)(Thread)

Re: hrm.
[info]visions
2000-11-29 11:15 pm UTC (link)
doh... you know what.. there is an error there.

key = orig;

after the loop.

BLAH. there is still the dll issue as well though :(

(Reply to this) (Parent)

No, I hadn't noticed.
[info]pangaea
2000-11-29 03:47 pm UTC (link)
But it's nice to know I can read 400 entries back. :)

(Reply to this)

Hmmm...
[info]wibbble
2000-11-30 05:16 pm UTC (link)
I don't suppose there's any way these changes could explain why every time I try and look at my friends page in Mac IE5 it crashes?

Tried a different style, tried with less friends displayed, tried deleting the livejournal.com and www.livejournal.com cookies (and then just /all/ my cookies) and it still crashes..

My old and horrible Netscape 4.something will display, but I'd rather use IE...

Everything else seems to work.. just not my friends page.

Any ideas? :o)

(Reply to this) (Thread)

Re: Hmmm...
[info]bradfitz
2000-11-30 05:22 pm UTC (link)
There's no way ANYTHING I do should be able to crash your browser.

And if I did change something that is causing it, it's not my fault at all.

Your browser should never crash. No program should ever crash.

(Reply to this) (Parent)(Thread)

Re: Hmmm...
[info]wibbble
2000-11-30 05:29 pm UTC (link)
Well, some HTML can crash IE5.0, I think.

This is because, in a word, it's bollocks.

It's just really weird, because the style I'm using is one I tweaked myself, and it always worked before...

Just checking everywhere that I thought might've been the cause.. :o)

(Reply to this) (Parent)(Thread)

Re: Hmmm...
[info]smitty99
2000-11-30 08:45 pm UTC (link)
I'm using the "Carbonized" version of IE 5 on an OS X machine, and no crashes from the friends page yet.

One thing though, it now only shows the first comment on any entry, additional comments are ignored. Then again, it may be all better tomorrow after my machine has had a 'time out' of sorts - it seems to do a few strange things that a reboot fixes.

(Reply to this) (Parent)(Thread)

Re: Hmmm...
[info]news
2000-11-30 08:59 pm UTC (link)
hit reload.

(Reply to this) (Parent)(Thread)

Re: Hmmm...
[info]smitty99
2000-11-30 09:24 pm UTC (link)
oh, I did, a few times. The issue even manifested itself with different pages, not just a single "Comments" page.

I can't really try anything now, as that was at work, and now I'm at home using IE 5.5/Win32. I'll try it again tomorrow, and get back to you if the problem reappears.

(Reply to this) (Parent)

Re: Hmmm...
[info]smitty99
2000-12-01 09:41 pm UTC (link)
It's still showing up. Probably a problem with IE5/Carbon. I never notice it in any other browser. Also, I looked at the source from within IE and it all looked good, nothing was obviously out of place.

(Reply to this) (Parent)

Re: Hmmm...
[info]wibbble
2000-12-01 11:27 am UTC (link)
I'm still on 8.6, with no plans to upgrade for the forseeable future. :o)

I've ran disc first aid over my rather abused HD (I'd use Norton, but I don't seem to have it installed anymore.. need to look the CD out).

I've yet to try my friends page today, since I want do to some stuff in the web before it makes me reboot ;o)

(Reply to this) (Parent)

(Reply from suspended user)

(Reply from suspended user)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…